我有一个Centos VPS,似乎有很多内存问题。 首先我的硬件:
Processor Information Processor #1 Vendor: GenuineIntel Processor #1 Name: Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Processor #1 speed: 198.721 MHz Processor #1 cache size: 6144 KB Processor #2 Vendor: GenuineIntel Processor #2 Name: Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Processor #2 speed: 198.721 MHz Processor #2 cache size: 6144 KB Processor #3 Vendor: GenuineIntel Processor #3 Name: Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Processor #3 speed: 198.721 MHz Processor #3 cache size: 6144 KB Processor #4 Vendor: GenuineIntel Processor #4 Name: Intel(R) Xeon(R) CPU E5405 @ 2.00GHz Processor #4 speed: 198.721 MHz Processor #4 cache size: 6144 KB Memory Information System Information Linux server.server777.ro 2.6.18-028stab060.2 #1 SMP Tue Jan 13 10:24:09 MSK 2009 x86_64 x86_64 x86_64 GNU/Linux Physical Disks Current Memory Usage total used free shared buffers cached Mem: 525312 426224 99088 0 0 0 -/+ buffers/cache: 426224 99088 Swap: 0 0 0 Total: 525312 426224 99088 Current Disk Usage Filesystem Size Used Avail Use% Mounted on /dev/vzfs 30G 13G 18G 44% / none 7.9G 4.0K 7.9G 1% /dev
内存似乎是由apache作为用户nobody在页面请求中生成的。 问题是代码没有改变。 我无法想象是什么造成这一点。
托pipe的网站不是很受欢迎,所以没有这么多交通工具进来。
我该如何去解决问题。 感谢您的任何build议。
当你运行顶部,并按内存sorting,是顶部(几次)httpd?
如果你的网站不stream行,你应该能够调整httpd.conf中的设置来限制StartServers,MaxSpareServers,MaxClients,ServerLimit等的数量。
此外,你可能想考虑像nginx( http://nginx.net/ )作为一个代理Apache,这几乎肯定会降低你的内存占用。