Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

linux ram
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

linux ram

dmmcintyre3dmmcintyre3 Member
edited August 2011 in General

Some nginx ram oddities

19587 nginx     15   0 24296  17m 1300 S  2.3 14.7  20:26.89 nginx  

it's the biggest ram consuming process, using more than MySQL or 1 PHP process unless I'm looking at something wrong. Then I went back after writing most of this post and it was down to 6mb. Last night I saw 57mb in the RES column for nginx.

Also, free -m reports less ram used than the use reported by the RES column for just the top 5 processes.



  • skagerrakskagerrak Member
    edited August 2011

    Edit says: Wrong answer.

  • This is a KVM VPS.

  • Yeah something looks wrong. On my main site with Nginx serving ~80 requests/sec, the memory rarely goes over 6MB RSS for Nginx. As you are using PHP-FPM with persisting FastCGI connection, maybe that is building up the memory? For example try to turn that off, or use the regular PHP/FastCGI.

    Nginx can also build up memory usage if you keep large buffers in memory. Check whether you have very large fastcgi_buffer_size in your config?

  • I am using php-fpm which sometimes spawns a third process, but it's normally just 2 processes.

    In the fastcgi_parms file, main nginx config and the php there is no fastcgi_buffer_size.

Sign In or Register to comment.