Howdy, Stranger!

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


Why is the memory usage so high ?
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.

Why is the memory usage so high ?

sbmcosgsbmcosg Member
edited August 2013 in Help

hey,

I'm running a webserver with nginx and varnish for just one wordpress website which has no traffic right now.

the VPS is consuming a lot of memory , the nginx process, i tried killing the process but they come back.

can some one tell me what is the issue here ?

thank you

consumes a lot more, upto 90% + of 256MB RAM

Comments

  • Tweak your configuration. You don't need that many nginx workers and php-fpm children.

    Did you disable innodb on mysql?

  • @seraphkz said:
    Tweak your [...] children.

  • Your nginx processes look fine, but you should only have as many nginx workers as you have access to cpu cores. If it's 4 cores, then you're good.

    It's your php-fpm processes that are taking the majority of your memory. Look into optimizing your zone(s) in /etc/php5/fpm/pool.d/

    Start with pm.max_children and pm.start_servers if you're lost. Maybe let some of your php-fpm servers timeout after a shorter time limit as well.

  • You could also switch to dropbear for ssh and exim4 for mail.

  • MunMun Member

    http://www.linuxatemyram.com/

    First of all you have 106 MBs free on your server. A good chunk is actually being used by cache (which is good). You might want to turn off varnish in this situation as it is redundant by most regards as well.

    Mun

  • ok guys did some of the stuff you guys suggested

    How does it look now ?

  • smansman Member
    edited August 2013

    You should subtract cache/buffer memory to determine actual memory usage. Cache/buffer is essentially unused that saves recently used in case it's needed again so as to speed up the access and reduce unnecessary disk I/O. It confuses a lot of people but it's completely normal for Linux to try use all available memory this way.

  • @sman i understand that part now, still wanted to know about any unnecessary processes thats all.

  • set nginx(1 process per core) and php fpm to spawn less processes and tweak your varnish to use less memory

Sign In or Register to comment.