ubuntips
README.md

Ubuntu Tips

Practical notes on provisioning, tuning and hardening Ubuntu servers.

This site collects the parts of running Ubuntu servers that are easy to get subtly wrong: tuning values that only matter under load, hardening steps that are worth doing once, and the occasional script that saves an afternoon.

26 posts so far. Everything is Markdown in a git repository.

New here? Start with the setup-script guide or why this site is static.

Latest posts 26 total

Pinned: One idempotent script for the whole Ubuntu web stack

posted Nov 18, 2026 · 15 min read

Angie, PHP-FPM, MariaDB, Valkey and Elasticsearch from a single Bash entry point: every command, option and safety rule in one place.

The MariaDB query cache earned its place back, and 14,000 lines of migration code left

posted Nov 30, 2026 · 8 min read

With every server on 1.22, my setup script dropped the one-time migration from Angie, Sury PHP and packaged Redis/Valkey: about 14,200 lines, guarded by a check that refuses any host still in the old state. The same cycle tested nine performance ideas across MariaDB, PHP and the kernel. One won: the MariaDB query cache, 9-11 % faster on every uncached XenForo page, even with a writer posting twice a second. Six lost, and the numbers are here.

One Valkey restart per run: folding three restarts into the BOLT swap

posted Nov 30, 2026 · 5 min read

An --optimize run of my setup script could restart Valkey three times in a row: once for its configuration, once for a new build and once for the BOLT-optimized binary. Each restart writes and reloads the cache snapshot. BOLT never needed the live server, so the release folds all three into one restart, and a fresh install now starts Valkey exactly once. Measured with a 20 ms probe: 3 restarts down to 1, with the same throughput.

Setup script 1.22.5, before and after: XenForo 17-32 % faster on the same box

posted Nov 27, 2026 · 8 min read

I benchmarked the whole 1.22.5 release against 1.22.4 the way a server gets it: an --optimize run, a reboot, then load. Cached XenForo pages went from 122k to 161k req/s, uncached pages 17-22 % faster, p99 14-20 % lower, and PHP-FPM uses half the memory. Most of it is the kernel; the rest is a new allocator for PHP, a lower Brotli level and AWS-LC under nginx. The benchmark also caught a bug that would have stopped every updated server from rebuilding PHP.

Moving servers off Sury PHP and Angie packages: five bugs I found first

posted Nov 26, 2026 · 5 min read

Before running my setup script's one-time migration on live servers, I rebuilt their package-based setup on a test box and in VMs, for every PHP series from 8.1 to 8.6 and for Ubuntu 24.04. The migration worked on the first host shape I had tested, and broke in five different ways on the others. Fixed, it makes cached pages 13-19 % faster and PHP pages up to 14 % faster.

All posts →