Page 1 of 1

Too little RAM?

Posted: Fri Oct 10, 2014 12:33 am
by WhaleTrain
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?

Re: Too little RAM?

Posted: Fri Oct 10, 2014 1:14 am
by DirkS
Only one way to find out... try it

Gr.
Dirk.

Re: Too little RAM?

Posted: Fri Oct 10, 2014 3:40 am
by elatllat
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.

Re: Too little RAM?

Posted: Fri Oct 10, 2014 12:59 pm
by klricks
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.

Re: Too little RAM?

Posted: Fri Oct 10, 2014 1:02 pm
by ShiftPlusOne
owncloud is going to be terrible no matter what you do

Re: Too little RAM?

Posted: Sat Oct 11, 2014 11:34 pm
by permaband
Another chime for CPU. The biggest single bottleneck alas.

Re: Too little RAM?

Posted: Sun Oct 12, 2014 8:01 am
by DougieLawson
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.

Re: Too little RAM?

Posted: Sun Oct 12, 2014 9:07 am
by jamesh
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.

Re: Too little RAM?

Posted: Sun Oct 12, 2014 9:22 am
by r3d4
>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.

Re: Too little RAM?

Posted: Wed Oct 15, 2014 1:42 am
by HiroProtagonist
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...

Re: Too little RAM?

Posted: Wed Oct 15, 2014 8:36 am
by jamesh
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....

Re: Too little RAM?

Posted: Wed Oct 15, 2014 9:21 am
by Ravenous
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 :)

Re: Too little RAM?

Posted: Sat Oct 18, 2014 8:47 am
by gdt
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.

Re: Too little RAM?

Posted: Sat Oct 18, 2014 2:20 pm
by DougieLawson
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?

Re: Too little RAM?

Posted: Sat Oct 18, 2014 6:26 pm
by drgeoff
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:

Re: Too little RAM?

Posted: Sat Oct 18, 2014 10:35 pm
by mahjongg
i assume you are scanning traffic destined for windows systems, otherwise it is indeed, as Dougie finely mentions "a useless placebo".

Re: Too little RAM?

Posted: Sat Oct 18, 2014 10:38 pm
by ShiftPlusOne
AIUI, it's not very useful even to protect windows systems.