I run a CentOS 5.7 machine (64bit) with 24GB ram and 4x SAS drives in RAID10 setup. This machine runs nginx/1.0.10, php-fpm & xcache. About a month back the RAM usage of this machine has changed.

About every few hours the 'CACHE' is flushed from the RAM, this happens exactly when the 'Inode table usage' drops. I'm pretty sure these drops are related. (see the 2 attached images).

enter image description here enter image description here

This server hosts quite a lot of small files (20M all a few KB big). Not many files are deleted (maybe 100 per hour (total size a few MB max)), not enough to account for the huge Inode table drops.

I also have no crons running which could cause these drops.

Sar -r output: http://pastebin.com/C4D0B79i

My question: Why are these huge RAM/Inode usage drops happening? How can I get Nginx/PHP to use all of my servers RAM?

link|improve this question

73% accept rate
Hmm, can you paste your php-fpm configuration file, your nginx server config, and your xcache config? As well, can you paste the output of lsof both before and after an cache/buffer clear? – Justin Lynn Feb 7 at 6:30
I have put my configs here: pastebin.com/iEWJchc4 and the output of LSOF here: hostlogr.com/lsof.txt. The thing i do notice the VERY large number of php-fpm processes that go to /dev/zero. Which is specified in my xcache configuration. Could that possibly be wrong? – FunkyChicken Feb 7 at 8:31
Okay, so, about how many requests per second is this server handling? I'm also somewhat curious if you're php backends aren't being restarted by php-fpm all around the same point. Can you do a ps aux before and after the cache clear? – Justin Lynn Feb 8 at 1:27
Hello, I have been running sar -r a few more times, and it does indeed go over 16GB sometimes. Sometimes even 17GB. – FunkyChicken Feb 8 at 8:37
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.