Howdy, Stranger!

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

how to reduce memory usage debian 6 nginx + php5
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.

how to reduce memory usage debian 6 nginx + php5

kaliuskalius Member
edited February 2012 in Help

I'm doing a base install to host a few wordpress blogs on a LEB. My memory usage is around 75mb after using the @tigersway scripts + low memory my.cnf Any suggestions on reducing the memory usage some more? Php5-fpm seems to be the biggest offender. I'm open to switching from nginx + php5-fpm if it would help.


  • Only compile the modules you need and compile from source.

    Things to remove from Nginx:

    How to compile php-fpm:

    I can get my installation down to about 60MB, but that is just keeping on request active which is not advised. 75MB is pretty good actually.

  • @derek thanks, I was considering that.

    I see some people talking about lower usage and a kloxo template that only uses around 20mb and figured there was still room to cut on mine.

  • bretonbreton Member
    edited February 2012

    Try to install wordpress with sqlite. I am quite sure that you don't have a busy blog with lots of writes to it on a LEB, so you don't really need mysql and sqlite will save you 20MB of memory; also turn off mysql and pdo_mysql plugins in php.ini. Reduce the number of nginx workers to 1 or 2.
    php-fpm will use a lot of memory anyway, but it will use it for something like caching.
    If you have some ftp servers running, turn them off.

    Also when checking memory don't forget that you bash session uses ~5MB.

  • @kalius said: Php5-fpm seems to be the biggest offender.

    Wordpress is probably the biggest offender.

    The memory size of a php5-fpm process is determined by the php scripts that are being run.

  • I am not familiar with the @tigersway scripts so I don't know what they turn off or remove. You can gain a few MB by doing things that I have not seen in the scripts. Turn off the tty1-6 getty's in inittab by commenting them out with a #. Run your ssh server under inetd or xinetd. I have got down to about 5MB of usage with those changes. Doesn't do anything for mysql, webserver or php though.

    If you can get by with sqlite as @breton suggests, it will save a lot.

  • @brenton: I looked into that but I'm concerned if it breaks on a security update, also last update of the Plugin was on 2010,and I read of some bugs.

    @sleddog: I have looked into replacing wordpress but always have to come back, usually because of lack of themes and ease of customization.

    @cleonard: thanks ill look into those.

  • @sleddog said: Wordpress is probably the biggest offender.

    YEah, it sucks u_u and I use it lol.

Sign In or Register to comment.