APC is showing 100% fragmentation

Daniel Fischer picture Daniel Fischer · Feb 17, 2010 · Viewed 9k times · Source

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?

Thanks in advance.

Answer

Frank Farmer picture Frank Farmer · Jun 4, 2010

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%.

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.

Moral of the story: give APC enough memory, and monitor utilization.