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.

38 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 38 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.

PGO for php-fpm is now on by default

posted Dec 2, 2026 · 8 min read

My setup script now builds php-fpm with clang PGO from a profile it records on the host itself: a short guest crawl of the host's own sites on a temporary php-fpm and nginx. The CLI stays plain, failures keep the running build, and on the Xeon test host the shipped code path gave +1.0 to +1.5 % on every PHP tier on top of BOLT, with none slower.

What open WebSockets cost a XenForo server

posted Dec 2, 2026 · 6 min read

Every change to my setup script has to keep every XenForo page tier's throughput. For opt-in Centrifugo, I measured what the forum's pages lose while member sockets are open. At 4,000 sockets, a normal peak, the pages lost 1.5 to 3.7 % of their requests per second, and that is an upper bound. A 10,000-socket stress run at about 50,000 frames a second cost 27 to 32 %, which is the box running out of capacity, not a regression.

Centrifugo: the release binary or a source build

posted Dec 2, 2026 · 5 min read

My setup script compiles nginx, PHP and Valkey with -march=native, LTO and BOLT, so I asked whether Centrifugo should be compiled too. I built it from the same tag with the release's own Go version, once like the release and once for AVX2-class CPUs. At 4,000 and 10,000 sockets nothing moved beyond noise, so the verified release binary stays and no Go toolchain goes on servers.

Centrifugo on its memory engine or on Valkey

posted Dec 2, 2026 · 5 min read

I tried pairing Centrifugo with the Valkey my setup script already runs. The unix socket never worked, because Centrifugo 6.10.4 dials every Redis address over TCP. Over loopback TCP the Valkey engine tied the memory engine at 4,000 sockets and did worse at 10,000, so it is gone and Centrifugo keeps its in-process engine.

All posts →