Question: Creeping memory usage?

5 posts / 0 new
Last post
#1 Sat, 01/11/2014 - 10:53
groston

Question: Creeping memory usage?

All,

Thank to great support from the folks on this forum, my site has been up and stable for several months.

I was curious about how much memory my server is consuming, so I created a script which contains the following: date >> memtrack.txt free -m >> memtrack.txt and created a cron job to run this once per day at midnight.

Following is a cleaned up version of the output since the last server reboot:

last boot: 2014-01-06 11:57 Tue Jan 7 00:00:01 Mem-/+ buffers/cache: 353 Wed Jan 8 00:00:01 Mem-/+ buffers/cache: 375 Thu Jan 9 00:00:01 Mem-/+ buffers/cache: 453 Fri Jan 10 00:00:01 Mem-/+ buffers/cache: 463 Sat Jan 11 00:00:01 Mem-/+ buffers/cache: 513

The server is running Centos 6.5 x64. I do run a drupal site (which is very lightly trafficked) and email.

Is this behavior, i.e., increasing amount of memory, normal?

Sat, 01/11/2014 - 17:21
Locutus

Linux tends to use free memory for file system cache. You might want to use a tool like atop for more precise memory measurement and history recording.

Sat, 01/11/2014 - 18:06
groston

Locutus,

I will look into that, but please note that the value I reported is the value minus the amount used for buffers and cache.

Sun, 01/12/2014 - 08:12
Locutus

Okay, in that case, atop could help identifying which process(es) use more and more memory, since it records historical resource usage at selectable intervals. Likely culprits can be PHP processes that cache stuff, or spam/virus scanner.

Sun, 01/12/2014 - 19:06
groston

I have added atop to the script - just have to learn how to interpret the output! :-)

Topic locked