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.

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

Compiling Valkey, and the BOLT flag that gave my binaries an executable stack

posted Nov 25, 2026 · 3 min read

Valkey from source was 35 % slower until I stopped passing CFLAGS on make's command line. Then its unit refused the BOLTed binary, which exposed an executable stack in my compiled PHP and Angie too. Plus nginx vs Angie, compiled the same way.

Compiling Angie too, and the hardening my compiled PHP was missing

posted Nov 25, 2026 · 5 min read

Angie compiled from source served cached pages 4-6 % faster; zlib-ng cut its gzip cost by a fifth. PGO, AutoFDO and a static glibc were measured; and the from-source php-fpm got back the stack protector and RELRO that upstream clang leaves off.

Why my from-source PHP was slower, and the one-line answer: ICU

posted Nov 24, 2026 · 4 min read

A from-source php-fpm executed 9 % fewer instructions per page than a clang build using Sury's extensions, yet ran 1-2 % slower. The cause was ICU: the intl extension made the binary 102 MB and multiplied data-TLB misses by 4.5. Without it, the merged build is the fastest: +11 % on logged-in XenForo pages.

Three php-fpm builds side by side: Sury, clang + BOLT, and everything from source

posted Nov 24, 2026 · 7 min read

My earlier compiled-PHP tests found nothing. Two flaws in my build harness were hiding the gain: GCC was built without its global registers, and BOLT was never tried. With both fixed, a BOLT-optimised php-fpm is 5-10 % faster on logged-in XenForo pages. Building every library from upstream as well added nothing measurable.

All posts →