codaholic
Posts: 3
Joined: Sat Dec 01, 2018 1:14 pm

A ton of question for raspberry pi.

Sat Dec 01, 2018 1:22 pm

I would like to setup a PC for coding and I got tons of questions for it:

Can somebody tell me how much percentage of the memory(RAM) does the OS take for it's own usage?

And Here's how I would like to use it:
Coding, possibly use nano or vim to save resource, ssh,sftp(from terminal too, if possible) and a bit of browsing. Would I get any problems when using Pi 3 B+? Like Lags or Hangs?

Can I use a 32inch TV screen as my monitor?

I don't know if I have nore, but it felt like much more earlier. Maybe they'll come again. Thanks.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: A ton of question for raspberry pi.

Sat Dec 01, 2018 3:09 pm

codaholic wrote:
Sat Dec 01, 2018 1:22 pm
I would like to setup a PC for coding and I got tons of questions for it:

Can somebody tell me how much percentage of the memory(RAM) does the OS take for it's own usage?
That is highly dependant on the OS you choose to use and how you configure said OS. So multiple answers here:
  1. About 10% (100MB) For Raspbian Desktop, default config without any extras.
  2. About 8% (80MB) for Raspbian Lite (command line only) default config.
  3. About 5% (50MB) for a lite BSD installation.
  4. About 15% (150MB) for Ubuntu.
  5. About 2% (20MB) with a normal RISC OS config.
  6. I do not know about the other systems.
And Here's how I would like to use it:
Coding, possibly use nano or vim to save resource, ssh,sftp(from terminal too, if possible) and a bit of browsing. Would I get any problems when using Pi 3 B+? Like Lags or Hangs?

That again depends on the choice of OS, as well as the choice of tools, web browser, size of project being compiled, etc, etc.
Can I use a 32inch TV screen as my monitor?

YES:
If it has HDMI input that is the preffered monitor for use with a Raspberry Pi (HDMI TV that is).
If it is much older and only has composite input you will be limited to low resolutions.
I don't know if I have nore, but it felt like much more earlier. Maybe they'll come again. Thanks.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

jahboater
Posts: 6089
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: A ton of question for raspberry pi.

Sat Dec 01, 2018 3:45 pm

codaholic wrote:
Sat Dec 01, 2018 1:22 pm
And Here's how I would like to use it:
Coding, possibly use nano or vim to save resource, ssh,sftp(from terminal too, if possible) and a bit of browsing. Would I get any problems when using Pi 3 B+? Like Lags or Hangs?
The Pi3B+ works very well like that and is quite fast. Perfectly usable.
Use scp for transferring files, it is very simple (like the cp command) and you can easily set it up not to require passwords (like ssh).
In my experience it will only lag of hang if you do something ridiculous.

Heater
Posts: 16504
Joined: Tue Jul 17, 2012 3:02 pm

Re: A ton of question for raspberry pi.

Sat Dec 01, 2018 4:21 pm

codaholic,
I would like to setup a PC for coding and I got tons of questions for it:
"PC" now a days is taken to mean a big box running Windows or perhaps a laptop. Do you actually mean you would like to set up a Raspberry Pi for coding?
Can somebody tell me how much percentage of the memory(RAM) does the OS take for it's own usage?
No idea, not much. I have never had to think about for all the coding I have done on a Pi.
And Here's how I would like to use it: Coding, possibly use nano or vim to save resource, ssh,sftp(from terminal too, if possible) ...
Sounds like a good plan. Works well for me.
...and a bit of browsing.
That is not coding. But browsers work well enough on the Pi. Apart from the difficulties people have watching Youtube or using webgl.
Would I get any problems when using Pi 3 B+? Like Lags or Hangs?
I have never experienced such for code I have created on the Pi. Depends what your performance requirements are.
Can I use a 32inch TV screen as my monitor?
I don't see why not. I presume it has an HDMI input.
I don't know if I have nore, but it felt like much more earlier. Maybe they'll come again. Thanks.
It's best to keep to a single question/problem per thread. People are more likely to answer a specific question asked in a succinct and clear manner rather than wade though many paragraphs of noise.
Memory in C++ is a leaky abstraction .

jahboater
Posts: 6089
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: A ton of question for raspberry pi.

Sat Dec 01, 2018 4:40 pm

Can somebody tell me how much percentage of the memory(RAM) does the OS take for it's own usage?
DavidS gave a good answer to that above, with numbers.

I agree, if you write code so bad that you run out 1GB of memory, something is wrong.

Heater
Posts: 16504
Joined: Tue Jul 17, 2012 3:02 pm

Re: A ton of question for raspberry pi.

Sat Dec 01, 2018 9:36 pm

There seems to be a couple of posts by n67 and I deleted here.

What happened ?
Memory in C++ is a leaky abstraction .

drgeoff
Posts: 11097
Joined: Wed Jan 25, 2012 6:39 pm

Re: A ton of question for raspberry pi.

Sat Dec 01, 2018 11:07 pm

Heater wrote:
Sat Dec 01, 2018 9:36 pm
There seems to be a couple of posts by n67 and I deleted here.

What happened ?
There was a post mentioning "coding" as a term in social sciences. That isn't here now.
Quis custodiet ipsos custodes?

Heater
Posts: 16504
Joined: Tue Jul 17, 2012 3:02 pm

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 12:10 am

drgeoff,
There was a post mentioning "coding" as a term in social sciences. That isn't here now.
I'm glad you said that. I was starting to think I imagined it and am losing my mind.
Memory in C++ is a leaky abstraction .

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 12:41 am

Funny how it all works, innit?
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

Heater
Posts: 16504
Joined: Tue Jul 17, 2012 3:02 pm

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 1:21 am

n67,
Funny how it all works, innit?
Just now it's giving me the creeps.

Perhaps I'll see the funny side in the morning.
Memory in C++ is a leaky abstraction .

codaholic
Posts: 3
Joined: Sat Dec 01, 2018 1:14 pm

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 2:13 am

Thank you for the replies, and thank you DavidS for the numbers, I will be using Raspbian OS, so I guess I won't have big issues, and maybe I should mention that I will not be compiling anything on the pi, I'll just SFTP/SCP it on another machine then ssh on it to compile.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 2:40 am

codaholic wrote:
Sun Dec 02, 2018 2:13 am
Thank you for the replies, and thank you DavidS for the numbers, I will be using Raspbian OS, so I guess I won't have big issues, and maybe I should mention that I will not be compiling anything on the pi, I'll just SFTP/SCP it on another machine then ssh on it to compile.
Well then you are going to have no issues at all. Fair warning there are pit falls in cross compiling.

The RPi 3B/3B+ is way more than powerful enough to allow for compiling though, just so you are aware.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

codaholic
Posts: 3
Joined: Sat Dec 01, 2018 1:14 pm

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 2:44 am

DavidS wrote:
Sun Dec 02, 2018 2:40 am
codaholic wrote:
Sun Dec 02, 2018 2:13 am
Thank you for the replies, and thank you DavidS for the numbers, I will be using Raspbian OS, so I guess I won't have big issues, and maybe I should mention that I will not be compiling anything on the pi, I'll just SFTP/SCP it on another machine then ssh on it to compile.
Well then you are going to have no issues at all. Fair warning there are pit falls in cross compiling.

The RPi 3B/3B+ is way more than powerful enough to allow for compiling though, just so you are aware.
Thanks. I guess I should really go and buy some pi :-D thanks.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 3:38 am

codaholic wrote:
Sun Dec 02, 2018 2:44 am
DavidS wrote:
Sun Dec 02, 2018 2:40 am
codaholic wrote:
Sun Dec 02, 2018 2:13 am
Thank you for the replies, and thank you DavidS for the numbers, I will be using Raspbian OS, so I guess I won't have big issues, and maybe I should mention that I will not be compiling anything on the pi, I'll just SFTP/SCP it on another machine then ssh on it to compile.
Well then you are going to have no issues at all. Fair warning there are pit falls in cross compiling.

The RPi 3B/3B+ is way more than powerful enough to allow for compiling though, just so you are aware.
Thanks. I guess I should really go and buy some pi :-D thanks.
No problem. I bought my first in 2012, when they just came out, now just ordered my first 3B+ (already having all the full sized models inbetween[B/B+/2B/3B]). And I am on my RPi 3B now (still waiting for my 3B+ to get to me).
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27020
Joined: Sat Jul 30, 2011 7:41 pm

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 7:59 am

Heater wrote:
Sat Dec 01, 2018 9:36 pm
There seems to be a couple of posts by n67 and I deleted here.

What happened ?
I deleted some OT posts that were going to disrail the thread. Please keep on topic. Discussion about social sciences? Not on topic.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
Imperf3kt
Posts: 3835
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 9:04 pm

jahboater wrote:
Sat Dec 01, 2018 4:40 pm
Can somebody tell me how much percentage of the memory(RAM) does the OS take for it's own usage?
DavidS gave a good answer to that above, with numbers.

I agree, if you write code so bad that you run out 1GB of memory, something is wrong.
People often forget the GPU needs to use some of that RAM. If you're doing anything that requires graphic performance, you can expect about a quarter of that to disappear, poof, gone.
Add the system overhead and you're nearly half out of your RAM already...
55:55:44:44:4C
52:4C:52:42:41

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27020
Joined: Sat Jul 30, 2011 7:41 pm

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 9:20 pm

Imperf3kt wrote:
Sun Dec 02, 2018 9:04 pm
jahboater wrote:
Sat Dec 01, 2018 4:40 pm
Can somebody tell me how much percentage of the memory(RAM) does the OS take for it's own usage?
DavidS gave a good answer to that above, with numbers.

I agree, if you write code so bad that you run out 1GB of memory, something is wrong.
People often forget the GPU needs to use some of that RAM. If you're doing anything that requires graphic performance, you can expect about a quarter of that to disappear, poof, gone.
Add the system overhead and you're nearly half out of your RAM already...
When I was a lad, we had 32k of memory, and 20k of that went on the frame buffer. Still managed to program some good stuff.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

jahboater
Posts: 6089
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 9:25 pm

jamesh wrote:
Sun Dec 02, 2018 9:20 pm
[When I was a lad, we had 32k of memory, and 20k of that went on the frame buffer. Still managed to program some good stuff.
We had a large mainframe at college. 512k words of memory. It supported a whole university. Post grads doing scientific research, countless under grads.

One computer I programed had 1k of memory and had to be programmed in hex (no Z80 assembler). A friend and I managed to solve the 8 queens problem on it. While the memory was being accessed the screen went snowy!

512GB of free memory ..........

User avatar
Imperf3kt
Posts: 3835
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: A ton of question for raspberry pi.

Sun Dec 02, 2018 10:30 pm

jamesh wrote:
Sun Dec 02, 2018 9:20 pm
Imperf3kt wrote:
Sun Dec 02, 2018 9:04 pm
jahboater wrote:
Sat Dec 01, 2018 4:40 pm

DavidS gave a good answer to that above, with numbers.

I agree, if you write code so bad that you run out 1GB of memory, something is wrong.
People often forget the GPU needs to use some of that RAM. If you're doing anything that requires graphic performance, you can expect about a quarter of that to disappear, poof, gone.
Add the system overhead and you're nearly half out of your RAM already...
When I was a lad, we had 32k of memory, and 20k of that went on the frame buffer. Still managed to program some good stuff.
When you were a lad, computers ran on 8bits and displayed half a dozen pixels a second and did one thing which would take hours or even days to do.
Now they run on 32 or 64 bits and display billions of pixels every second and do thousands of things simultaneously in seconds.

Every time I see this "when I was a lad" nonsense, it irritates me greatly.
This is 2018, not 1967
Computers are a lot more powerful, but they also use a lot more resources.

By the way, 'pong' can still use just a small amount of RAM on a modern PC, but most people are no longer impressed by a white dot slowly bouncing back and forth.
https://scratch.mit.edu/projects/98686485/
55:55:44:44:4C
52:4C:52:42:41

code_exec
Posts: 273
Joined: Sun Sep 30, 2018 12:25 pm

Re: A ton of question for raspberry pi.

Mon Dec 03, 2018 5:52 am

codaholic wrote:
Sat Dec 01, 2018 1:22 pm
I would like to setup a PC for coding and I got tons of questions for it:

Can somebody tell me how much percentage of the memory(RAM) does the OS take for it's own usage?

And Here's how I would like to use it:
Coding, possibly use nano or vim to save resource, ssh,sftp(from terminal too, if possible) and a bit of browsing. Would I get any problems when using Pi 3 B+? Like Lags or Hangs?

Can I use a 32inch TV screen as my monitor?

I don't know if I have nore, but it felt like much more earlier. Maybe they'll come again. Thanks.
The recommended OS for the Pi (Raspbian) is optimised so that it takes up as little memory as possible. If your Pi is lagging and you have six Chromium tabs open with a YouTube video playing in each one of them, then blame that, not the OS itself.

Also, you can use a 32 inch screen as a monitor, but if you get issues such as black bars around the display output, you may need to modify some stuff in config.txt.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

User avatar
bensimmo
Posts: 4827
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: A ton of question for raspberry pi.

Mon Dec 03, 2018 9:14 am

For the record, if it's a Pi3B or 3B+, you can just do it all on the Pi itself with Desktop Raspbian, unless you prefer to program in nano etc and not a nice desktop IDE.
You can also VLC/RDP if needed.

Even the web browsing, though you may find that does get 'laggy' in places. Probably as Chromium needs a good chunk of the RAM set aside (192MB I think still ?) and is a huge program taking up the RAM even with the ad blocker supplied.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27020
Joined: Sat Jul 30, 2011 7:41 pm

Re: A ton of question for raspberry pi.

Mon Dec 03, 2018 9:18 am

Imperf3kt wrote:
Sun Dec 02, 2018 10:30 pm
jamesh wrote:
Sun Dec 02, 2018 9:20 pm
Imperf3kt wrote:
Sun Dec 02, 2018 9:04 pm


People often forget the GPU needs to use some of that RAM. If you're doing anything that requires graphic performance, you can expect about a quarter of that to disappear, poof, gone.
Add the system overhead and you're nearly half out of your RAM already...
When I was a lad, we had 32k of memory, and 20k of that went on the frame buffer. Still managed to program some good stuff.
When you were a lad, computers ran on 8bits and displayed half a dozen pixels a second and did one thing which would take hours or even days to do.
Now they run on 32 or 64 bits and display billions of pixels every second and do thousands of things simultaneously in seconds.

Every time I see this "when I was a lad" nonsense, it irritates me greatly.
This is 2018, not 1967
Computers are a lot more powerful, but they also use a lot more resources.

By the way, 'pong' can still use just a small amount of RAM on a modern PC, but most people are no longer impressed by a white dot slowly bouncing back and forth.
https://scratch.mit.edu/projects/98686485/
You have ENTIRELY missed the point. Of course machines nowadays are more complex, and the software is more complex (ever worked on a camera ISP - shoving huge amounts of data around at high speed?). But much software on these complex systems nowadays is also badly writtten. Having a limited system FORCES engineers to learn efficient ways of doing things. Give someone infinite memory, and you get crap, memory hungry code because there is no need to be frugal.

So rather than being irritated, learn to write better code by using a constrained system. It's actually a useful skill now we have IoT devices with very limited resources. The Pi is profligate in memory compared with IoT devives.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

W. H. Heydt
Posts: 13242
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: A ton of question for raspberry pi.

Mon Dec 03, 2018 3:18 pm

jamesh wrote:
Mon Dec 03, 2018 9:18 am
You have ENTIRELY missed the point. Of course machines nowadays are more complex, and the software is more complex (ever worked on a camera ISP - shoving huge amounts of data around at high speed?). But much software on these complex systems nowadays is also badly writtten. Having a limited system FORCES engineers to learn efficient ways of doing things. Give someone infinite memory, and you get crap, memory hungry code because there is no need to be frugal.
Back in the day when IBM first started shipping machines with virtual memory support (anyone else remember "DAT boxes"?), the programmers around me all started saying things like, "Wow! Now we can use as much memory as we want!" I replied with two terms: "locality of reference" and "thrashing". Then I proceeded to point out that virtual memory is *not* a panacea for not wanting (or not being able to) write tight code.

On a Pi it is even worse, as normal operation involves the use of a storage medium with a rather limited lifespan...especially if you write to it a lot, which managing virtual memory (aka "swap space") certainly does.

jahboater
Posts: 6089
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: A ton of question for raspberry pi.

Mon Dec 03, 2018 3:25 pm

W. H. Heydt wrote:
Mon Dec 03, 2018 3:18 pm
Back in the day when IBM first started shipping machines with virtual memory support (anyone else remember "DAT boxes
Didn't IBM place a huge full page advert in the Times newspaper with just the words "IBM Announce Paging" ?? !
Quietly forgetting that other mainframe manufacturers had been doing it for years.

User avatar
Imperf3kt
Posts: 3835
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: A ton of question for raspberry pi.

Mon Dec 03, 2018 8:40 pm

Jamesh, you are an experienced coder, so you know how to improve and optimise code.
Beginners don't even know how to code, let alone optimise it.

What is more important, learning to drive, or learning to minimise fuel consumption?

Cart before the horse...


I do apologise as I know this is somewhat rude, but I do think that your multiple decades of experience is blinding you to how beginners feel.
55:55:44:44:4C
52:4C:52:42:41

Return to “General discussion”