我在亚马逊的ec2免费层上建立了一个站点,它有613 up内存,没有交换空间。我看到服务器一直在使用几乎100%的内存。我的网站是运行wordpress与wp超级磁盘缓存打开。而且网站并不繁忙,每天大约300 is。有人能看出这很正常吗,还是出了什么问题?谢谢!
free -m
total used free shared buffers cached
Mem: 596 589 7 0 0 14
-/+ buffers/cache: 574 22
Swap: 0 0 0
ps aux | grep "apache"
apache 10120 0.2 5.1 287908 31732 ? S 10:41 0:19 /usr/sbin/httpd
apache 10122 0.2 4.9 288448 30504 ? S 10:41 0:22 /usr/sbin/httpd
apache 10123 0.2 4.8 288380 29676 ? S 10:41 0:20 /usr/sbin/httpd
apache 10124 0.2 5.1 287616 31708 ? S 10:41 0:21 /usr/sbin/httpd
apache 10125 0.2 4.6 287428 28704 ? S 10:41 0:20 /usr/sbin/httpd
apache 10126 0.2 5.2 288376 32372 ? S 10:41 0:22 /usr/sbin/httpd
apache 10127 0.2 4.6 284028 28164 ? S 10:41 0:21 /usr/sbin/httpd
apache 10207 0.2 5.3 288452 32396 ? S 10:49 0:19 /usr/sbin/httpd
apache 10224 0.2 4.3 284520 26496 ? S 10:50 0:19 /usr/sbin/httpd
apache 10226 0.2 5.1 287872 31640 ? S 10:50 0:20 /usr/sbin/httpd
apache 10376 0.2 5.0 288340 30856 ? S 11:03 0:16 /usr/sbin/httpd
apache 10453 0.2 5.2 288416 32384 ? S 11:10 0:16 /usr/sbin/httpd
apache 10455 0.1 5.2 288124 32252 ? S 11:10 0:15 /usr/sbin/httpd
apache 10457 0.2 4.8 288380 29676 ? S 11:10 0:15 /usr/sbin/httpd
apache 10459 0.1 5.2 288636 32224 ? S 11:10 0:14 /usr/sbin/httpd
apache 12106 0.2 4.8 288384 29536 ? S 13:07 0:01 /usr/sbin/httpd
apache 12107 0.2 4.8 288380 29480 ? S 13:07 0:02 /usr/sbin/httpd
apache 12110 0.2 4.8 288380 29496 ? S 13:07 0:01 /usr/sbin/httpd发布于 2011-05-13 23:24:36
编辑/etc/apache/apache.conf文件,并将MaxClients设置为30。注意您的apache错误日志,看看客户端是否用完了,如果是的话,将MaxClients增加5。在您不再收到错误后,再添加5只以提供一点空间。
还可以检查/etc/php5 5/apache/php.ini的memory_limit设置。对于WordPress,您可能需要64 For的设置。如果您正在运行任何图形操作(例如缩略图生成器等),则需要将其提高到96 up。
如果您也在该服务器上运行MySQL,则应检查是否可以减少一些关键索引大小或其他内存消耗设置。
https://serverfault.com/questions/269505
复制相似问题