So here we are with our next post on how to reduce the amount of resources your website uses. We were initially planning on making this post a full rundown on how to track down resource usage. But since so many of our clients run WordPress, we thought we should quickly introduce the easiest way to reduce resource usage and improve page load speeds for WordPress.

LiteSpeed Cache AKA LSCache

Is an amazing server side page cache for WordPress. Unlike most cache plugins, LSCache is tightly integrated with the Litespeed webserver that we run on our shared servers. This gives it a great performance benefit over other cache plugins. If you trust us, skip reading the rest of blog and just install this: WordPress Plugin. If you are concerned about the install being complex, rest assured it is dead simple. We wrote a kb article on installing LSCache WordPress plugin here. Once installed, simply enable it and you’re probably good to go (if you have a complex site you *MAY* need to do some further configuration). You’ll get a huge boost in performance!

All of our shared servers powering our shared hosting products have Litespeed and LSCache enabled. If you are a VPS or dedicated server client we can set it up for you and help you with the license fees – just submit a support ticket.

At EZP.net, we consider a cache plugin for your WordPress site a “must have”.

Why? Because WordPress is a PHP/Database driven platform. That means for every page request your WordPress site without a cache plugin receives, the server must process the PHP code for your site and then deliver the PHP generated HTML back to the browser.

With a cache plugin such as W3_Total_Cache or LSCache, when your WordPress site receives a page request, the server first checks to see if the requested HTML is in the cache, if so it is sent directly to the browser bypassing all of the PHP processing. If it is not in the cache, then the PHP code is processed, the HTML outputted and then delivered to both the browser and the cache.

Depending on the complexity of your site, this seemingly simple step processing of PHP code can use up a LOT of CPU & RAM plus take a lot of time. This makes your WordPress site slow. We all know that no one wants to spend time surfing a slow website.

For our shared hosting customers, using too much CPU & RAM can cause your site to hit the Cloudlinux limits we discussed in our last post. For VPS or dedicted server clients, using too much CPU & RAM means you’ll be looking at an upgrade sooner than you should.

Because a cache plugin can bypass processing the PHP code, it can dramatically speed up your website and reduce the resources your website uses.

Cache is not just for WordPress either, cache helps with almost every PHP driven website. You can read a bit more about LSCache for other CMS’s here & here.

But we know, you don’t want to just take our word for it. You want to see cold, hard numbers. Ok, fine. We’re happy to oblige!

Testing LSCache WordPress Plugin.

First we’ll test our site with no cache plugin at all, simply hosted on a standard EZP.net shared hosting package:


ab -n 100 -c 10 https://www.ezp.net/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.ezp.net (be patient)…..done

Server Software: LiteSpeed
Server Hostname: www.ezp.net
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128

Document Path: /
Document Length: 28173 bytes

Concurrency Level: 10
Time taken for tests: 11.611 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 2851500 bytes
HTML transferred: 2817300 bytes
Requests per second: 8.61 [#/sec] (mean)
Time per request: 1161.139 [ms] (mean)
Time per request: 116.114 [ms] (mean, across all concurrent requests)
Transfer rate: 239.82 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 6 11 8.2 8 42
Processing: 243 1110 226.4 1114 1803
Waiting: 200 993 204.2 990 1640
Total: 251 1121 227.5 1124 1821

Percentage of the requests served within a certain time (ms)
50% 1124
66% 1183
75% 1223
80% 1258
90% 1359
95% 1560
98% 1636
99% 1821
100% 1821 (longest request)

I’ve highlighted the line in the report we are most interested in, “requests per second”. This is, well; what it sounds like – how many requests per second the site was able to send the apachebench software.

Everyone knows WordPress is not the leanest, meanest & fastest platform around. Our site, on our basic shared hosting platform; is able to push out just over 8 requests per second which is quite a lot of page requests over a month if you do the math! (We did.. it’s over 20M requests per month!). However, this had the CPU usage for the account at nearly 100% usage, which is a BAD thing.

For our next test, I’ve installed the extremely popular W3_Total_Cache plugin and setup caching:


ab -n 100 -c 10 https://www.ezp.net/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.ezp.net (be patient)…..done

Server Software: LiteSpeed
Server Hostname: www.ezp.net
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128

Document Path: /
Document Length: 28493 bytes

Concurrency Level: 10
Time taken for tests: 1.205 seconds
Complete requests: 100
Failed requests: 99
(Connect: 0, Receive: 0, Length: 99, Exceptions: 0)
Write errors: 0
Total transferred: 2867779 bytes
HTML transferred: 2826071 bytes
Requests per second: 82.98 [#/sec] (mean)
Time per request: 120.508 [ms] (mean)
Time per request: 12.051 [ms] (mean, across all concurrent requests)
Transfer rate: 2323.96 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 9 44 11.9 45 69
Processing: 7 43 57.7 32 423
Waiting: 1 22 57.2 10 417
Total: 51 86 55.8 76 450

Percentage of the requests served within a certain time (ms)
50% 76
66% 79
75% 83
80% 84
90% 90
95% 111
98% 339
99% 450
100% 450 (longest request)

As you can see, there was a dramatic improvement of nearly 10x! The requests per second went from 8.61 without cache to 82.98 with W3_Total_Cache. Very, very respectable.

Now lets see what we get with the LSCache plugin:


ab -n 100 -c 10 https://www.ezp.net/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.ezp.net (be patient)…..done

Server Software: LiteSpeed
Server Hostname: www.ezp.net
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128

Document Path: /
Document Length: 28251 bytes

Concurrency Level: 10
Time taken for tests: 0.558 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 2866800 bytes
HTML transferred: 2825100 bytes
Requests per second: 179.20 [#/sec] (mean)
Time per request: 55.802 [ms] (mean)
Time per request: 5.580 [ms] (mean, across all concurrent requests)
Transfer rate: 5017.01 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 7 32 8.9 33 47
Processing: 3 22 10.6 21 56
Waiting: 0 8 6.5 5 25
Total: 10 54 14.0 54 99

Percentage of the requests served within a certain time (ms)
50% 54
66% 58
75% 62
80% 63
90% 71
95% 83
98% 90
99% 99
100% 99 (longest request)

We’ve gone from 8.61 requests per second without a cache plugin to 179.20 requests per second with LSCache. This is a gain of over 20x!

LSCache also doubled the performance of the W3_Total_Cache plugin. I’d say we have a clear winner here.

Obviously, every site is going to be a little different and this is simply a basic benchmark but it does showcase what we have seen anecdotally on our servers – that LSCache and WordPress go very well together. We’ve seen server loads dramatically decrease and page speeds dramatically improve by simply replacing other popular WordPress Cache plugins with the LSCache plugin.