Some time ago I optimized server for Mothercare and it could be a sample of well optimized for performance
web site. It is hosted in a virtual private server with 4 CPU cores (2.4GHz) and 4Gb RAM.
The first thing to monitor is HTTP response latency.
As you can see here in the picture above, average response time is 0.15 sec. Due to PageSpeed Insights, it is below 0.2 sec thus it’s a good value.
But it seems that this hosting is a little bit overpriced because most of time it’s nearly idle. This is specific for retail industry. Most load happens during clearance sale.
Load average below 1 means that in most cases there is no additional delay during disk reads/writes. For this server it’s quite important because it has a regular HDD disk with 7200 rpm.
Another factor that matters in this case is amount of memory. I’d wish this server to have 8Gb RAM, but unfortunately there was no such an option available. For this reason I had to increase depth of the queue of incoming HTTP connections to reduce hard drive load. In simple words we do not allow the server to process more than N requests simultaneously. In case there are more site visitors coming, they are put to queue until current requests are processed. Everything like in a real retail shop 🙂
The first disadvantage of this approach was that latency increased from 100ms to 150ms.
The second one is that number of opened HTTP connections is not endless. Single IP address could theoretically handle up to 65535 opened connections. In practice this number is lower. In any case if server runs out of this number, it stops to respond to anything. This situation is known as DoS (Denial of Service). So the disadvantage is that DoS capacity decreased.
The last graph is the most important one for Linux systems. It is desired to have only half of the memory allocated because in this case the second half could be used for filesystem caching. In case the server has enough RAM, it simply don’t need to read anything from disk at all. HDD works in write-only mode in this case (except system boot time).
The more files you have in filesystem, the more RAM you need for caching them.
In general my impressions on Extmedia VPS Hosting are very positive. The main lesson learned is that it could be useful to be able to add/remove CPU cores and RAM gigabytes on demand.