Scaling-out WordPress – Performance Measures – Cache influence

Cache Influence on req/sec

Results overview


There is a classical method to increase the performance of web site that consists in caching the HTML pages that are rendering to the client.
That avoids the server to execute the code to request the database and to render the page. The pre-formatted HTML page is generally stored in the file system.
I would like to try it with this workload (that is perfect for caching because there is no specific information linked to the visitor).

I could use many methods:

  • caching with apache
  • caching with varnish
  • caching with a specialized PHP code

I decided to use the third method as there are a lot of existing WordPress plugins that do the job.
I installed the wp super cache plugin and did a new series of tests.

Test #17, WP Super Cache Plugin, APC activated, 1 Front, 4Vcpu, 2GB on server ade-esxi-02 (Intel(R) Core(TM) Quad CPU Q6600 @ 2.40GHz; No Hyperthreading; 8 GB DDR2 800) :

$ ab -kc 100 -n 1000 http://tu-web-01/mysite/
Requests per second:    1298.79 [#/sec] (mean)

dstat shows a 35% CPU (idle at 65%)

Rem:
As you can notice, I ran this test with 100 simultaneous connections and a total of 1000 connections.
Testing as usual with 10 simultaneous connections and a total of 100 connections is too fast. In this condition, the number of request per sec is roughly 1000 req/sec

Again this test is ideal as the HTML pages can be cached without any problems (no information linked to the visitor), but what happens if there are.

Test #18, WP Super Cache Plugin on a post with a comment, APC activated, 1 Front, 4Vcpu, 2GB on server ade-esxi-02 (Intel(R) Core(TM) Quad CPU Q6600 @ 2.40GHz; No Hyperthreading; 8 GB DDR2 800) :

In this test, we show that the cache is not active when viewing a post with a comment leaved by a visitor (as stated in the readme of the plugin)

$ ab -kc 10 -n 100 http://tu-web-01/mysite/index.php/test3/
Requests per second:    13.64 [#/sec] (mean)

Conclusion on using WP super cache

The following graph shows an increase of performance in an order of magnitude of 100

Cache Influence on req/sec

Cache Influence on req/sec

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *