4

After weeks of messing around in my setup I finally managed to get APC to work with Mod_Ruid2 enabled in WHM and setting DSO as PHP-handler. I own a XEN VPS with 2 GB RAM and 4 CPU-cores on which I run 4 Wordpress sites - of which 2 are big, regularly updated (+/- 15000 posts total) sites with lots of traffic (8000 uniques a day total for both sites).

APC is running fine overall, but I was just wondering if I could get the fragmentation down a bit.

I have been observing APC now for a while and I see the fragmentation carefully going up. As you can see by the screenshot after little over an hour the fragmentation is above 10% and will keep rising, sometimes making a step down. In short, it never drops below 10%. What might be useful to note is that server load never goes above 1.5, no matter how high fragmentation is.

http://ScrnSht.com/pmculx

On various blogs it is said that it's best to keep fragmentation at a minimum and below 10%. So I was wondering if any of you could take a look at my settings and see if you have any suggestions.

http://ScrnSht.com/hbypfy

Looking forward to your reactions!

---- Edit: 18-08-2012 10:26

APC has been running for 15 hours now after I set it back to its default settings (only raised shm_size to 512MB) and fragmentation is swinging around 15%. Yesterday I noticed it going up to 26%, but it managed to get it back to 15%, so I think that's decent right?

HopelessN00b
  • 54,273
Loki
  • 61

2 Answers2

1

Your APC cache looks fine; it's certainly not excessively fragmented, and if you aren't having performance problems then there's no real need to worry about it.

Let it run 24 hours, and then take a look at it to see if you still have good performance and enough free space in the cache.

Michael Hampton
  • 252,907
1

What appeared to cause all the fragmentation was a Facebook Like Box that I had placed in the sidebar of my posts. This little widget alone 'cost' about 50 requests per pageload and consisted of 20-30 tiny javascripts (with a total 500KiB per pageload, according to Pingdom), which changed on each request - different faces, different script. I guess APC tries to cache them all only to throw them away again.

Anyway, I removed the widget, cleared my cache and now it has been running for 12 hours straight with only 8% fragmentation - with default settings and shm_size at 512MB.

Thanks anyway for all the help guys.

Loki
  • 61