{"id":9518,"date":"2018-04-12T06:00:29","date_gmt":"2018-04-12T10:00:29","guid":{"rendered":"https:\/\/blog.litespeedtech.com\/?p=9518"},"modified":"2018-04-12T06:00:29","modified_gmt":"2018-04-12T10:00:29","slug":"benchmarks-litespeed-cache-module-for-drupal","status":"publish","type":"post","link":"https:\/\/lswp.store\/index.php\/2018\/04\/12\/benchmarks-litespeed-cache-module-for-drupal\/","title":{"rendered":"Benchmarking LSCache for Drupal"},"content":{"rendered":"<p><a href=\"https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-2.jpeg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-9520\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-2.jpeg\" alt=\"LiteSpeed Cache Module for Drupal Benchmarks\" width=\"1000\" height=\"500\" srcset=\"https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-2.jpeg 1000w, https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-2-300x150.jpeg 300w, https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-2-768x384.jpeg 768w, https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-2-600x300.jpeg 600w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/a><\/p>\n<p>We\u2019re back with more benchmarks! This time, we\u2019ve put our new <a href=\"https:\/\/www.litespeedtech.com\/support\/wiki\/doku.php\/litespeed_wiki:cache:lscdrupal\">LSCache module for Drupal 8<\/a> to the test. We compared <a href=\"https:\/\/www.litespeedtech.com\/products\/litespeed-web-server\">LiteSpeed Web Server with LSCache<\/a>, Apache with Varnish (Cachewall), and Apache with System Cache.<\/p>\n<p>Our testing consisted of burst tests and load testing, both of which are explained in more detail below.<\/p>\n<h2>The Results<\/h2>\n<h3>Benchmark<\/h3>\n<p>The following chart shows how many requests per second each server + cache solution combination processed during our burst tests. The larger the number, the better.<br \/>\n<img decoding=\"async\" title=\"\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-5.png\" alt=\"\" width=\"672\" height=\"384\" \/><br \/>\nAs you can see, LiteSpeed Web Server + LSCache outperforms both Apache + Varnish and Apache + System Cache.<\/p>\n<h3>Load Testing<\/h3>\n<p>The following graphs show the CPU and Memory usage during testing for each server + cache solution combination tested. For these measurements, a smaller number is better.<br \/>\n<img decoding=\"async\" title=\"\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-7.png\" alt=\"\" width=\"672\" height=\"384\" \/><img loading=\"lazy\" decoding=\"async\" title=\"\" src=\"https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-8.png\" alt=\"\" width=\"672\" height=\"384\" \/><br \/>\nLiteSpeed Web Server + LSCache consumed less memory and CPU than both Apache tests.<\/p>\n<h2>Try it Yourself<\/h2>\n<p>You can see the specs of our configuration and test environment below. Feel free to run the same benchmarks yourself and verify our results.<\/p>\n<p>These are the commands we used in all tests (Replace <code>example.com\/path<\/code> with the location of your test subjects):<\/p>\n<p><u>Benchmark<\/u><\/p>\n<pre>ab -n 10000 -k -H \"Accept-Encoding: gzip,deflate\" -c 100 example.com\/path<\/pre>\n<p><u>Load Testing<\/u><br \/>\nLSWS+LSCache and Apache+Varnish:<\/p>\n<pre>siege -c 100 -r 20 -d 6 example.com\/path<\/pre>\n<p>Apache+System:<\/p>\n<pre>siege -c 100 -r 20 -b example.com\/path<\/pre>\n<p><strong>NOTE:<\/strong> We used <code>-d 6<\/code> instead of <code>-b<\/code> in two cases because we wanted to ensure that each server+cache was processing roughly the same number of transactions per second. The <code>-d<\/code> parameter allows you to specify a delay.<\/p>\n<p>Each test was run five times, and the average result was used for our graphs.<\/p>\n<h3>Web Server Configuration<\/h3>\n<p>Common settings for LSWS and Apache:<\/p>\n<ul>\n<li>Keep-Alive ON<\/li>\n<li>PHP 7.1.15<\/li>\n<li>Zend OPCache ON<\/li>\n<li>Max Connections 20<\/li>\n<li>PHP Child 5<\/li>\n<\/ul>\n<h3>Test Environment<\/h3>\n<h4>Software<\/h4>\n<p>Web Server version:<\/p>\n<ul>\n<li>LSWS: v5.2.5<\/li>\n<li>Apache: v2.4.6<\/li>\n<\/ul>\n<p>Control Panel: cPanel: v68.0.36<br \/>\nOperating System: CloudLinux 7.4, all accounts set to unlimited<br \/>\nServer API version:<\/p>\n<ul>\n<li>LSWS: LSAPI v6.11<\/li>\n<li>Apache: FPM\/FastCGI<\/li>\n<\/ul>\n<p>Cache version:<\/p>\n<ul>\n<li>LSWS: <a href=\"https:\/\/www.litespeedtech.com\/support\/wiki\/doku.php\/litespeed_wiki:cache:lscdrupal\">LSCache for Drupal v1.0<\/a><\/li>\n<li>Apache: System Cache (Built-in)<\/li>\n<li>Apache: Varnish v4.1.4 (Cachewall)<\/li>\n<\/ul>\n<p>Drupal version: 8.5<\/p>\n<h4>Hardware<\/h4>\n<ul>\n<li>Web-Server: 1-CPU + 2G Memory<\/li>\n<li>ab-Server: 4-CPU + 4G Memory<\/li>\n<li>Network: 4.5G Bandwidth<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>We hope these results encourage you to give <a href=\"https:\/\/www.litespeedtech.com\/support\/wiki\/doku.php\/litespeed_wiki:cache:lscdrupal\">LSCache for Drupal 8<\/a> a try!<\/p>\n<p>If you run into any trouble or would like to share some feedback, <a href=\"https:\/\/www.litespeedtech.com\/support\/forum\/forums\/litespeed-cache-module-for-drupal.43\/\">drop by our forum<\/a>. We\u2019re here to help!<\/p>\n<p>And don\u2019t forget, <a href=\"https:\/\/goo.gl\/FG9S4N\">our Slack community<\/a> is a great place to connect other LiteSpeed users. Check out the #drupal-cache channel while you\u2019re there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019ve put our new LiteSpeed Cache module for Drupal 8 to the test, comparing its performance to that of Apache with Varnish (Cachewall), and Apache with System Cache.<\/p>\n","protected":false},"author":1,"featured_media":9520,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16,28],"tags":[98],"class_list":["post-9518","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-benchmarks","category-cache","tag-drupal"],"jetpack_featured_media_url":"https:\/\/lswp.store\/wp-content\/uploads\/2018\/04\/null-2.jpeg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/9518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/comments?post=9518"}],"version-history":[{"count":0,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/posts\/9518\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media\/9520"}],"wp:attachment":[{"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/media?parent=9518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/categories?post=9518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lswp.store\/index.php\/wp-json\/wp\/v2\/tags?post=9518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}