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.

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

clang, PHP 8.4 and the missing zlib: the last round of compiled PHP

posted Nov 23, 2026 · 6 min read

The final round of the compiled-PHP question: CentminMod's function alignment on its own, a clang build and PHP 8.4, with every module compiled from source. clang is the only build with a repeatable edge (+3 % on XenForo), 8.4 is slower than 8.5, and my earlier source builds were missing zlib.

Everything on: LTO, PGO and -march=native made PHP 8.5 slower

posted Nov 23, 2026 · 7 min read

A follow-up to the four-build PHP test: turn on every CentminMod compiler option, add LTO and two-stage PGO trained on real XenForo traffic, and compile every module from source. The result is 5 to 10 % slower than the distribution package, not faster.

Is a compiled PHP faster? Four builds, one Xeon, and a JIT that makes the question moot

posted Nov 23, 2026 · 6 min read

Sury packages, Ubuntu's archive, and PHP built from source with -O3 -march=native and only the modules XenForo needs. On a PHP-bound forum the difference was inside the noise, and the reason is the tracing JIT.

Who compresses a logged-in XenForo page? 12 % of PHP, one fastcgi_param, and a clock that lied

posted Nov 23, 2026 · 7 min read

Profiling the member pages of a XenForo forum showed zlib eating 12 % of PHP-FPM CPU: XenForo gzips its own pages at level 9 inside the worker. Moving that to Angie gave +5 % on the forum index and +9 % on thread pages. Along the way, a CPU turbo budget faked a 27 % speed-up, and three other ideas did not survive measurement.

All posts →