A few posts earlier, we have discovered that Google PageSpeed Insights is totally useless in measuring real website performance.
But how should you test website performance?
Real world website performance is measured not by minified Javascript or CSS. What really affects website performance most is traffic. So let’s provide the correct definition:
What this means in a nutshell, is that website with high performance will not be affected by large traffic. Its server response time is nearly a constant value.
Thus:
That is, even slight “cough” of traffic increase will cause the website to be unavailable.
Shared hosting accounts will inherently make your website slow. It means, your site would never actually see traffic or make any profit to their owner, for the simple fact that it can’t handle many visitors. It will be down or slow enough that the traffic cannot be handled at any time.
What this usually leads do – websites are abandoned early.
Let’s use Siege to test how fast a website is. In our definition of speed – we will test how the website handles traffic. Any dropped traffic is a flag for a slow website.
Install Siege on CentOS / Redhat:
yum -y install epel-release
yum -y install siege
Now buckle up, let’s send a small division of 25 virtual soldiers, poking the website repeatedly 10 times:
siege -d1 -r10 -c25 http://example.com/
Results might look like this:
Transactions: 575 hits Availability: 100.00 % Elapsed time: 35.60 secs Data transferred: 11.69 MB Response time: 0.31 secs Transaction rate: 16.15 trans/sec Throughput: 0.33 MB/sec Concurrency: 4.93 Successful transactions: 575 Failed transactions: 0 Longest transaction: 29.98 Shortest transaction: 0.01
Interpreting results
Availability less than 100% means there is a serious misconfiguration problem. Your website / server cannot handle traffic and you should really troubleshoot the software configuration or in some cases – change your hosting.
Transaction rate less than 50 per second, might indicate lack of full page cache solution at your website. The value you see might be affected by network latency especially when your testing server is located on a different continent. So if in doubt, you might want to test by running Siege on target server itself.
Longest transaction of anywhere more than 10 seconds might indicate that the server has no full page cache configured; does not have enough resources to handle traffic in a speedy manner; or needs to have full page cache warmed. Repeat the test to make sure that the cache is warmed.
Want to have a server that handles nearly any traffic? Let us help you install and configure perfect Linux server for Magento 2 or WordPress.