Portal Home > Knowledgebase > Articles Database > Memory eater...


Memory eater...




Posted by valmik0, 05-15-2009, 02:39 PM
I have got 512 MB RAM and TOP shows me 195528k used. Uptime 12 minutes. This server eats a lot of memory. I have 10 apache processes + 1 run by root. mysql 3161 1.5 2.0 54384 10436 ? Sl 20:21 0:12 /usr/sbin/mysqld --basedir=/us[...] www-data 3670 0.5 7.4 79204 37052 ? S 20:21 0:03 /usr/sbin/apache2 -k start www-data 3673 0.2 5.0 70568 25392 ? S 20:21 0:01 /usr/sbin/apache2 -k start www-data 3674 0.0 3.6 65464 18220 ? S 20:21 0:00 /usr/sbin/apache2 -k start www-data 3741 0.1 5.0 70296 25264 ? S 20:22 0:00 /usr/sbin/apache2 -k start www-data 3746 0.3 5.0 70672 25192 ? S 20:22 0:02 /usr/sbin/apache2 -k start www-data 4069 0.3 4.9 70300 24884 ? S 20:27 0:01 /usr/sbin/apache2 -k start www-data 4070 0.2 4.9 70320 24856 ? S 20:27 0:00 /usr/sbin/apache2 -k start www-data 4133 0.4 5.0 70292 25140 ? S 20:28 0:01 /usr/sbin/apache2 -k start www-data 4134 0.5 4.9 70020 24640 ? S 20:28 0:01 /usr/sbin/apache2 -k start www-data 4203 0.1 4.3 68752 21644 ? S 20:29 0:00 /usr/sbin/apache2 -k start This is apache.conf StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 Timeout 300 I utlize MYSQL (with innodb disabled). All of this for a Wordpress blog. Maximum users connected in the same time is 49. Can someone help me to optimize this Debian Lenny web server?

Posted by vapetrov, 05-15-2009, 10:31 PM
200MB is not a lot of memory. Do not use apache if you care about memory using. Try nginx or lighttpd + php-fastcgi or LiteSpeed.

Posted by UNIXy, 05-15-2009, 10:53 PM
What does httpd -l produce? Best

Posted by valmik0, 05-16-2009, 04:36 AM
I have no httpd command. I use Debian Lenny 32 bit. Web server uptime is about 14 hours and memory eaten is 260840k. Maybe I can write a cronjob that restarts Apache during the night. 3-4 seconds downtime are not a problem for me, because my site average daily visitors are roughly 650. I use Apache because I have more documentation and I need mod_rewrite.

Posted by lemeneid, 05-16-2009, 05:25 AM
Linux always caches your stuff till it maxes out its ram, its normal. The only time you need to worry is if you start using your swap. If your swap is 0, then everything is still running fine.

Posted by nohurge, 05-16-2009, 06:21 AM
apache -l or apache2 -l would do the same probably.

Posted by valmik0, 05-16-2009, 06:25 AM
apache2 -l Compiled in modules: core.c mod_log_config.c mod_logio.c prefork.c http_core.c mod_so.c



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
SFTP /FTPS by Default (Views: 442)
FlareWall (Views: 470)