HestiaCP is an actively developed fork of popular VestaCP, whos development somewhat stalled in the last little while.
This guide in ispired by excelent post on the official HestiaCP forum by user desp:
How to optimize memory and speed?
Here are three easy steps:
1. Determine hosting/server provider speed
Use excelent YABS script to determine the speed of your hosting solution.
*Geekbench 6 update: since 27 Feb 2023 update YABS uses Geekbench 6 as default benchmark – we’ll use flag -5
to run version 5 so we can compare the results.
wget -qO- yabs.sh | bash -s -- -5
Or if you just want Geekbench score (skipping disk (fio) -f and network (iperf) -i tests):
wget -qO- yabs.sh | bash -s -- -5fi
Test will return something like this:
Geekbench 5 Benchmark Test: --------------------------------- Test | Value | Single Core | 832 Multi Core | 867 Full Test | https://browser.geekbench.com/v5/cpu/<test_id_number>
Single core performance is the score we are interested in:
1000 or more | Great core performance, very good provider |
700 – 1000 | Normal performance, okay provider |
500 – 700 | Normal performance, can be better |
500 or less | Awful performance, avoid the provider |
Keep in mind, it’s the performance and page speed we’re after, if this is storage/backup optimized server with SAS (spinning) drives, lower numbers are completly accaptable.
Disk performance (IOPS):
fio Disk Speed Tests (Mixed R/W 50/50):
---------------------------------
Block Size | 4k (IOPS) | 64k (IOPS)
------ | --- ---- | ---- ----
Read | 22.76 MB/s (5.6k) | 173.71 MB/s (2.7k)
Write | 22.76 MB/s (5.6k) | 174.62 MB/s (2.7k)
Total | 45.52 MB/s (11.3k) | 348.33 MB/s (5.4k)
| |
Block Size | 512k (IOPS) | 1m (IOPS)
------ | --- ---- | ---- ----
Read | 170.55 MB/s (333) | 213.61 MB/s (208)
Write | 179.61 MB/s (350) | 227.84 MB/s (222)
Total | 350.16 MB/s (683) | 441.45 MB/s (430)
1000 or more | Great performance, SSD/NVMe with high IOPS |
RAM is not as important unless you’re running into heavy swapping.
Now that we established our KVM VPS / dedi server is fast enough, we can move on to the next step.
2. Lean HestiaCP install
Classic installation of hestiaCP will result in good enough general setup, that works for most, but it costs us performance. It uses Apache as webserver and Nginx only for caching proxy. Apache is slow.
So let’s trim of the fat and install only
Nginx + PHP + MySQL/MariaDB – without Apache.
Let’s use the handy Install string generator:
For example:
wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh
sudo bash hst-install.sh --apache no --phpfpm yes --multiphp no --vsftpd no --proftpd no --named no --mysql yes --postgresql no --exim yes --dovecot yes --sieve no --clamav no --spamassassin no --iptables yes --fail2ban yes --interactive yes
This will give us minimal installation, without BIND (DNS), and only EXIM as mailing solution.
3. Set WordPress template and caching
Login to control panel and your user.
Set tamplate
- Edit Web domain → Advanced Options → Web Template → WordPress
Set caching
- Enable Fast CGI Cache
- Set Cache duration → 5m, 10m
(if you have a lot of dynamic content, you can try microcache of 30s).
That’s it on the HestiaCP side, now your website should be crazy fast. For further optimisations, look into optimizing WP plugins and theme code.