Original post is here: eklausmeier.goip.de
1. Problem statement. I had written on website performance and measurement here:
- Speed-Tests with Pingdom.com
- Bandwith Diet for This Blog
- Accelerating Page Load Times by Reducing Requests
- Accelerating Page Load Times by Reducing Requests, Part #2
The overall lessons were:
- Measure your website performance
- Reduce content size (mostly CSS and JavaScript)
- Reduce image size by using modern file formats, e.g., WebP
- Reduce number of requests
I now measured the website nukeKlaus.net, which I knew for some years and always was and is still very slow. This site is about nuclear energy production from the standpoint of an nuclear energy engineer. It gives a wealth of information on technology, country usage, nuclear waste management, financing of nuclear power plants, and economic opinion. It is written by Dr.-Ing. Klaus Humpich.
2. Measurements. DNS lookup of nukeklaus.net shows no problems.
1$ time nslookup www.nukeklaus.net
2Server: 192.168.0.1
3Address: 192.168.0.1#53
4
5Non-authoritative answer:
6Name: www.nukeklaus.net
7Address: 89.163.237.217
8
9 real 0.05s
10 user 0.00s
11 sys 0
12 swapped 0
13 total space 0
Measuring with tools.pingdom.com for Frankfurt (Germany) for "http://www.nukeklaus.net/2020/09/25/beginn-einer-atemberaubenden-serie/" gives:
Obviously, the performance is terrible. Analyzing what request are made, one finds:
Below diagrams clearly shows that most of the time is wasted with waiting.
Above image was produced by uploading the har.json from pingdom.com to har-viewer.
Below is the partial list of downloaded resources:
- www.nukeklaus.net
- www.nukeklaus.net/2020/09/25/beginn-einer-atemberaubenden-serie/
- www.nukeklaus.net/wp-content/plugins/wp-user-avatar/assets/css/frontend.min.css?ver=4.1.1
- www.nukeklaus.net/wp-content/plugins/wp-user-avatar/assets/flatpickr/flatpickr.min.css?ver=4.1.1
- www.nukeklaus.net/wp-content/plugins/wp-user-avatar/assets/flatpickr/flatpickr.min.js?ver=6.0.1
- www.nukeklaus.net/wp-content/plugins/wp-user-avatar/assets/js/frontend.min.js?ver=4.1.1
- www.nukeklaus.net/wp-content/plugins/wp-user-avatar/assets/select2/select2.min.css?ver=6.0.1
- www.nukeklaus.net/wp-content/plugins/wp-user-avatar/assets/select2/select2.min.js?ver=6.0.1
- www.nukeklaus.net/wp-content/themes/twentysixteen/css/blocks.css?ver=20220524
- www.nukeklaus.net/wp-content/themes/twentysixteen/genericons/genericons.css?ver=20201208
- www.nukeklaus.net/wp-content/themes/twentysixteen/js/functions.js?ver=20181217
- www.nukeklaus.net/wp-content/themes/twentysixteen/js/skip-link-focus-fix.js?ver=20170530
- www.nukeklaus.net/wp-content/themes/twentysixteen/style.css?ver=20201208
- www.nukeklaus.net/wp-content/uploads/2018/04/cropped-KeepMum-Kopie-1-1024x407.png
- www.nukeklaus.net/wp-content/uploads/2018/04/cropped-Ohne-Titel-2-1-192x192.png
- www.nukeklaus.net/wp-content/uploads/2018/04/cropped-Ohne-Titel-2-1-32x32.png
- www.nukeklaus.net/wp-content/uploads/2018/04/Ohne-Titel-2-150x150.png
- www.nukeklaus.net/wp-includes/css/dist/block-library/style.min.css?ver=6.0.1
- www.nukeklaus.net/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.3.2
- www.nukeklaus.net/wp-includes/js/jquery/jquery.min.js?ver=3.6.0
- www.nukeklaus.net/wp-includes/js/wp-emoji-release.min.js?ver=6.0.1
- www.nukeklaus.net/xmlrpc.php
- csp.withgoogle.com/csp/report-to/apps-themes\
- fonts.googleapis.com/css?family=Merriweather%3A400%2C700%2C900%2C400italic%2C700italic%2C900italic%7CMontserrat%3A400%2C700%7CInconsolata%3A400&subset=latin%2Clatin-ext&display=fallback
- fonts.gstatic.com/s/merriweather/v30/u-440qyriQwlOrhSvowK_l5-fCZM.woff2
- fonts.gstatic.com/s/merriweather/v30/u-4m0qyriQwlOrhSvowK_l5-eRZOf-I.woff2
- fonts.gstatic.com/s/merriweather/v30/u-4n0qyriQwlOrhSvowK_l52_wFZWMf6.woff2
- fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw5aXo.woff2
- fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w5aXo.woff2
Just downloading the HTML content lasts more than 11s:
1$ time curl http://www.nukeklaus.net/2020/09/25/beginn-einer-atemberaubenden-serie/ -o /dev/null
2 % Total % Received % Xferd Average Speed Time Time Time Current
3 Dload Upload Total Spent Left Speed
4100 56891 0 56891 0 0 4897 0 --:--:-- 0:00:11 --:--:-- 16866
5 real 11.63s
6 user 0.00s
7 sys 0
8 swapped 0
9 total space 0
While just downloading a single static file, an image in this case, is just fine:
1$ time curl http://www.nukeklaus.net/wp-content/uploads/2018/04/cropped-KeepMum-Kopie-1-768x305.png -o /dev/null
2 % Total % Received % Xferd Average Speed Time Time Time Current
3 Dload Upload Total Spent Left Speed
4100 373k 100 373k 0 0 2233k 0 --:--:-- --:--:-- --:--:-- 2247k
5 real 0.17s
6 user 0.01s
7 sys 0
8 swapped 0
9 total space 0
So the performance characteristics indicates that WordPress and/or MySQL are to blame.
3. Server setup. nukeklaus.net has the following setup.
- Hosted by myloc.de
- Uses WordPress.org 6.0.1. That version is current.
- It uses nginx 1.16.1, which is two years old and not recent. Recent version is 1.23.1.
- Uses PHP 7.3.9, which is three years old and does no longer get security fixes. Recent version is 8.1.9.
All this general setup does in no way explain the terrible performance.
4. Remedy. One possible solution for tuning the performance would be to use a static site generator. One could use Simplified Saaze. Another route would be to try to use a Varnish HTTP Cache. Also, the 26 HTTP requests indicate that a "request diet" would also be highly beneficial.