PDA

View Full Version : Free RAM up and down and up and ...?


edge
5th April 2006, 22:56
Is it normal for Linux (in my case Fedora RC4 used as only webserver) that the free / used RAM keeps going down, up, down, up ect ect?

Have a look at this image:
http://www.showthatimage.com/vip/00223231/server.memory-week.gif
Note that I have added 2GB more of RAM on Saterday.

Right now the free RAM is down to about 128MB!

falko
5th April 2006, 23:17
Maybe your load is changing constantly. You should check your cron jobs, logs, etc.

edge
6th April 2006, 00:14
Maybe your load is changing constantly. You should check your cron jobs, logs, etc.

So I guess this should not be like this?

The server does get about 30.000 visitors a day.

I'll have a look again at all the log files, but they are (for me) still not really understandable (lot's of info in it).

Any special thing I should look for?

sbovisjb1
6th April 2006, 01:03
Perhaps you have a memory leak?
These are some definitions
# where the program is left running, and consumes more and more memory over time (especially in embedded devices which may be left running for many years);
# where the program is able to request memory (e.g. shared memory) that is not released, even when the program terminates;
# where the leak is happening inside the operating system

You should check you're background processes with KwikDisk or someother utility to see what memory is actually been using when programs are running.
Good analytical programs are (these are for C, but the Kernel has a LOT of C files and scripts)
Purify: http://www-306.ibm.com/software/awdtools/purify/
Valgrind: http://valgrind.org/ and the howto is found here: http://www.faqs.org/docs/Linux-HOWTO/Valgrind-HOWTO.html

Insure++: http://www.parasoft.com/Insure
memwatch: http://www.linkdata.se/sourcecode.html

I hope that helps you some

edge
6th April 2006, 09:19
Hi sbovisjb1,

Thank you for the info.. Lot's of stuff to read and try :-/

I'm off testing some things now.

edge
6th April 2006, 23:16
Just to make sure I'm doing the correct things here..

Should the free RAM be low (server is using a lot) or high (server is NOT using a lot)?

sbovisjb1
7th April 2006, 04:29
If you are talking about the server usage low is good because its done in percentages.... i believe CentOS (from what i saw) only used 73% compared to FC4 wich used 80%....

falko
7th April 2006, 12:12
It is possible that your server caches lots of data in memory, that's why it uses so much.
You could install a monitoring tool like munin ( http://munin.projects.linpro.no/ ) that shows exactly what's happening with your memory.