问题描述
APC 显示100%的碎片.这不好吗?
APC is showing 100% fragmentation. Is this bad?
这是否意味着完全没有帮助?我应该采取哪些途径来改善局势?
Does it mean that it's not helping at all? What paths do I go down to improve situation?
谢谢.
推荐答案
以我的经验,是的.我有一个系统,其中APC显示了100%的碎片,并且性能很差.我将APC的内存限制(在我的情况下增加到200 MB,但是我们有很多代码)足以给它留出一些余地.碎片减少到零,并且IIRC,服务器上的CPU使用率下降了50%.
In my experience, yes. I had a system where APC was showing 100% fragmentation, and performance was bad. I increased APC's memory limit (to 200 MB in my case -- but we had a lot of code) enough to give it some slack room. Fragmentation dropped to zero, and IIRC, CPU usage on the server dropped by 50%.
此外,请确保您使用的是APC随附的apc.php脚本来监视碎片/利用率.我们甚至写了一张nagios检查来查看APC,因为我们有足够的流量,当APC装满时,apache会完全锁定.
Also, make sure you're using the apc.php script that comes with APC to monitor fragmentation/utilization. We've even written a nagios check to watch APC, 'cause we have enough traffic that apache locks up entirely when APC fills up.
故事的寓意:给APC足够的内存,并监视利用率.
Moral of the story: give APC enough memory, and monitor utilization.
这篇关于APC显示100%碎片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!