WordPress, eAccelerator, & MySQL
I found an article on optimizing server configuration for WordPress. One of the suggestions was to enable query cache on MySQL. This allows some of the database queries that are run frequently to be saved in memory so that the query does not need to be re-executed.
The code to add into /etc/my.cn is:
query_cache_type = 1
query_cache_size = 26214400
Then restart MySQL. You can verify it is working by logging into MySQL and running the following query: SHOW STATUS LIKE 'Qcache%';
I also installed a program called eAccelerator which "increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated." View the results below, the MySQL tweaks helped quite a bit, but the major speed increase occurred after eAccelerator was installed. Tests were run with ApacheBench.
Before eAccelerator & SQL Cache Requests per second: 10.29 (mean) Time per request: 97.223 [ms] Transfer rate: 118.86 [Kbytes/sec] |
After eAccelerator & SQL Cache Requests per second: 34.24 (mean) Time per request: 29.202 [ms] Transfer rate: 402.86 [Kbytes/sec] |
Leave a comment
You must be logged in to post a comment.