I have my own virtual server in the cloud, running nginx and APC. On this server I have one wordpress blog using the W3TC-plugin. I've enabled page cache and object cache using APC.
When accessing front page, pages and posts the response from the server comes almost instantly. But when doing a search, the response takes 1 second.
I'm wondering if it is possible to make the response faster.
Using the Debug Queries WP-plugin I've profiled the search sql query and it only takes 0.002 to complete. And according to W3TC most objects are cached. In fact, the Debug Queries plugin give the following report on a search result:
Total query time: 0,01482s for 120 queries.
Page generated in 0,00000s, 0,00% PHP, 0,00% MySQL
So it seems as if the page is generated very quick. But the response from the server still takes 1 second to complete.
How can I find out what it is that makes the response is taking long, even though the page is generated quick?
Note: I'm only talking about the response time from the server, not the time that it takes to generate the page in the browser.
Here is a example search result from my site.
This is my current php-fpm configuration: http://snipt.org/AiHg7
# tail /var/log/php5-fpm.log
[05-Oct-2013 20:20:04] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 8 total children
[07-Oct-2013 10:44:55] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 7 total children
[08-Oct-2013 10:20:05] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 7 total children
# ps aux | grep php
root 1251 0.0 0.1 398732 1328 ? Ss May28 6:38 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data 15678 0.0 1.9 458804 20296 ? S Jul17 0:13 php-fpm: pool www
www-data 18337 3.5 9.5 411072 98300 ? S 14:15 0:57 php-fpm: pool www
www-data 18732 2.6 10.9 426648 112268 ? S 14:20 0:34 php-fpm: pool www
www-data 19504 3.4 9.4 415556 97088 ? S 14:30 0:24 php-fpm: pool www
root 20433 0.0 0.0 7548 828 pts/0 S+ 14:41 0:00 grep php