WhaleTrain
Posts: 3
Joined: Wed Apr 30, 2014 9:30 pm

Too little RAM?

Fri Oct 10, 2014 12:33 am

Ok so I really should explain the title. Basically, I had a thought in my noggin about using my little Pi for the following uses SIMULTANEOUSLY but I'm questioning whether the minimum amount of 512MB will be enough?

1. Web Server using NGINX (Basic HTML/CSS for testing and maybe even a permanent site),
2. Using the same NGINX for an ownCloud system (http://blog.petrockblock.com/2012/08/15 ... pberry-pi/)
3. DLNA streaming to local devices.

Am I thinking too hard and the PI will be fine or will it struggle to run everything at the same time?

DirkS
Posts: 9967
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Too little RAM?

Fri Oct 10, 2014 1:14 am

Only one way to find out... try it

Gr.
Dirk.

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Too little RAM?

Fri Oct 10, 2014 3:40 am

Should be fine. I find cpu to be more limiting than the ram. Anything that uses that much is just doing it wrong and it's not hard to find or make a lightweight alternative.... think about it 512 MB is a lot.

Some tools (gcc,jre) use a lot of ram as a simple speed boost but swap will let you use them in a smarter way.

Node.js vs Apache for example... though I use lighttpd as a middle ground using 5% of RAM, rtorrent is the next largest consumer I have used.
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

klricks
Posts: 6609
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Too little RAM?

Fri Oct 10, 2014 12:59 pm

CPU loading will be the issue not RAM......... But since you won't be using video (GPU) much, set the GPU/CPU memory split = 16 so that the CPU gets the max amount of RAM (496). The default is 64/448 or 128/384 if you have ever enabled the camera. 16/496 is the minimum/Max allowed for GPU/CPU.
Use sudo raspi-config to set memory split.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6035
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Too little RAM?

Fri Oct 10, 2014 1:02 pm

owncloud is going to be terrible no matter what you do

permaband
Posts: 62
Joined: Wed Aug 01, 2012 2:14 pm
Location: uk
Contact: Website

Re: Too little RAM?

Sat Oct 11, 2014 11:34 pm

Another chime for CPU. The biggest single bottleneck alas.

User avatar
DougieLawson
Posts: 36319
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Too little RAM?

Sun Oct 12, 2014 8:01 am

permaband wrote:Another chime for CPU. The biggest single bottleneck alas.
Not really. The biggest bottleneck is the SMSC9514 USB & ethernet chip all inbound and outbound data goes through that chip.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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

Re: Too little RAM?

Sun Oct 12, 2014 9:07 am

permaband wrote:Another chime for CPU. The biggest single bottleneck alas.
Biggest bottleneck is badly written code...

When I was a lad, we had 1Mhz CPU's and 32KB RAM. We could do quite a lot with them. Then we got in to MB's RAM, and 300Mhz CPU's and we could do even more. Then we got in to 1Ghx CPU's and GB RAM, and people forgot how to write decent code.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

User avatar
r3d4
Posts: 967
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Too little RAM?

Sun Oct 12, 2014 9:22 am

>Too little ram , better than one big ram .

I guess 1 and 2 , or 3 .
Not 1 and 2 and 3 .
but this realy just lazy speculation ,it will most likely depend on trafic / what background process are up to ! try it .
WhaleTrain wrote:1. Web Server using NGINX (Basic HTML/CSS for testing and maybe even a permanent site),
2. Using the same NGINX for an ownCloud system (http://blog.petrockblock.com/2012/08/15 ... pberry-pi/)
3. DLNA streaming to local devices.

HiroProtagonist
Posts: 212
Joined: Sat Jun 29, 2013 9:45 am

Re: Too little RAM?

Wed Oct 15, 2014 1:42 am

jamesh wrote:When I was a lad, we had 1Mhz CPU's and 32KB RAM.
You had 32KB RAM? I used to DREAM about having 32KB RAM...

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

Re: Too little RAM?

Wed Oct 15, 2014 8:36 am

HiroProtagonist wrote:
jamesh wrote:When I was a lad, we had 1Mhz CPU's and 32KB RAM.
You had 32KB RAM? I used to DREAM about having 32KB RAM...
Don't forget, 20KB of that was for the video memory....
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Too little RAM?

Wed Oct 15, 2014 9:21 am

jamesh wrote:
HiroProtagonist wrote:You had 32KB RAM? I used to DREAM about having 32KB RAM...
Don't forget, 20KB of that was for the video memory....
I started with 1KB RAM, hardly enough memory to fill the screen :lol:

Kids repeatedly asking for faster processors and bigger memories. Learn to exploit the existing one first :)

gdt
Posts: 85
Joined: Thu Jul 19, 2012 10:19 am

Re: Too little RAM?

Sat Oct 18, 2014 8:47 am

You are asking a question about capacity planning for RAM. There's a great script for this: ps_mem.py.

I am running Apache and a Postfix mail server (with spam and virus checking). All that fits comfortably into 512MB, with the clamav virus scanner taking up by far the largest amount of RAM (240MB).

To give you an idea of the RAM footprint of a web server, here is Apache on that machine:

Code: Select all

 Private  +   Shared  =  RAM used	Program 
  3.1 MiB +   2.1 MiB =   5.2 MiB	apache2 (4)
I'd expect your applications to fit handsomely. You could do other users a favour by posting the output of ps_mem.py of your running system.

User avatar
DougieLawson
Posts: 36319
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Too little RAM?

Sat Oct 18, 2014 2:20 pm

gdt wrote: with the clamav virus scanner taking up by far the largest amount of RAM (240MB).
What reasons have you got for running that useless placebo?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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

Re: Too little RAM?

Sat Oct 18, 2014 6:26 pm

DougieLawson wrote:What reasons have you got for running that useless placebo?
I assume that (like myself) you never had cause to turn down a career in the Diplomatic Service. :lol:

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12344
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Too little RAM?

Sat Oct 18, 2014 10:35 pm

i assume you are scanning traffic destined for windows systems, otherwise it is indeed, as Dougie finely mentions "a useless placebo".

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6035
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Too little RAM?

Sat Oct 18, 2014 10:38 pm

AIUI, it's not very useful even to protect windows systems.

Return to “Networking and servers”