View Single Post
  #6  
Old 27th January 2012, 18:59
talkingnews talkingnews is offline
Member
 
Join Date: Jan 2011
Posts: 65
Thanks: 15
Thanked 5 Times in 5 Posts
Default Finally cracked it!

Finally, I've solved it!

The quick version:
Running php-fpm on ubuntu:

Code:
sudo nano /etc/php5/conf.d/apc.ini
You should see:

Code:
extension=apc.so
paste in the below lines:
Code:
apc.shm_size="196"
apc.ttl=0
apc.max_file_size="10M"
save and close.

If you've got limited memory, you could try:

Code:
apc.shm_size="96"
apc.ttl=0
apc.max_file_size="2M"
Do
Code:
service php5-fpm restart.
Now go to your Wordpress admin and watch that sucker fly with near instant response.

The long version
I was so damn sick of this slow admin I just decided to keep going, trying stuff.

Finally, I came across this post:
http://stackoverflow.com/questions/3...e-memory-for-p
then this
http://groups.drupal.org/node/75583
which led me to this post:
http://www.litespeedtech.com/support...ead.php?t=4366
and finally this:
http://2bits.com/articles/high-php-e...rformance.html

The key to this was "download http://pecl.php.net/get/APC extract and run the apc.php, there you have a nice diagram how your cache usage look like"

It showed APC was completely using its tiny default 32Mb, and was 100% fragmented. I've been running it for an hour, and see
Hits: 70874 (98.6%) Misses: 991 (1.4%) Used: 124.4 MBytes (63.5%) Fragmentation: 0.00%

Before this tweak it was something like 70% misses and 100% fragmentation. No wonder Wordpress was running slow!
Reply With Quote