Linux guides
32 guides in Performance & Advanced · advanced.
Build a Stratum-1 NTP Server on a Pi
Build a GPS-disciplined Stratum-1 NTP server on a Raspberry Pi using a PPS-capable GPS module, chrony refclock directives, and the pps-gpio kernel driver.
Flash Tasmota onto an ESP8266/ESP32 Device
Flash Tasmota firmware onto ESP8266/ESP32 devices from Linux using esptool.py, configure GPIO templates, connect to MQTT, and enable OTA updates.
Set Up an Encrypted ZFS Pool
Configure native ZFS encryption with aes-256-gcm, manage keys and boot unlock, rotate keys safely, and replicate datasets encrypted with zfs send -w.
Write Your First Kernel Module
Build, load, and debug a Linux kernel module from scratch: hello-world source, kbuild Makefile, insmod/modprobe workflow, and dmesg debugging on modern distros.
The Linux Page Cache Explained
Deep dive into Linux page cache mechanics: how reads and writes flow through cache, dirty page writeback, fsync durability guarantees, and vm.dirty_* sysctl tuning.
PostgreSQL Performance Tuning
Tune PostgreSQL 15/16 with pg_stat_statements for query visibility, smarter autovacuum thresholds, targeted indexing, and parallel query execution.
Linux Memory: Anonymous, File-backed, zswap
Deep dive into Linux anonymous vs file-backed pages, reclaim mechanics, vm.swappiness, zswap compression tuning, and zram setup for maximum memory efficiency.
Linux Virtual Memory Tuning
Tune Linux virtual memory for production: control overcommit_memory, swappiness, min_free_kbytes, and use drop_caches safely to reduce OOM kills and swap pressure.
Linux Namespaces Deep Dive
A hands-on guide to all seven Linux namespace types — mnt, pid, net, user, uts, ipc, cgroup — plus unshare and nsenter with concrete shell examples.
The Linux CPU Scheduler Explained
Deep dive into the Linux CPU scheduler: how CFS, nice values, real-time policies, multi-queue SMP, and the new sched_ext BPF framework work and how to tune them.
Build a Custom Kernel the Debian Way
Build a custom Linux kernel on Debian or Ubuntu using make deb-pkg, producing clean .deb packages for easy install, update, and rollback.
ZFS Snapshots and Send/Receive
Create atomic ZFS snapshots, replicate datasets incrementally over SSH with zfs send/receive, and automate retention policies using zfs-auto-snapshot.
Virtualisation with QEMU/KVM (deep dive)
Full guide to QEMU/KVM with libvirt: storage pools, virtual networks, virsh management, CPU pinning, and VFIO GPU passthrough on Linux.
Use cgroup v2 for Resource Limits
Learn to use cgroup v2 with systemd slices, scopes, MemoryMax, CPUWeight, and IOWeight to enforce precise resource limits on Linux services and processes.
Use bpftrace for Live Kernel Tracing
Learn to use bpftrace for live Linux kernel tracing: one-liners, tracepoints, kprobes, and syscall latency histograms with real eBPF scripts.
NUMA and CPU Pinning on Linux
Pin processes to specific CPUs and NUMA nodes using taskset, numactl, and systemd cgroup cpusets to cut memory latency and boost throughput on multi-socket Linux servers.
An Introduction to io_uring
Learn how io_uring's shared ring buffers work, benchmark it against libaio with fio, and harden multi-tenant Linux servers against its known attack surface.
Hugepages and Transparent Huge Pages
Learn when Transparent Huge Pages hurt database performance, how to disable THP persistently with systemd, and how to configure static hugepages for PostgreSQL and other databases.
GPU Passthrough for a Gaming VM
Pass a GPU directly to a KVM/QEMU Windows VM using IOMMU, vfio-pci, and Looking Glass — with honest notes on anti-cheat compatibility.
How to Tune PostgreSQL for Performance
Tune PostgreSQL for production by configuring shared_buffers, work_mem, autovacuum, index hygiene, and pg_stat_statements query profiling — with per-distro commands.
How to Observe a Linux System with eBPF
Use bpftrace one-liners and BCC tools to trace syscalls, I/O latency, CPU flame graphs, and TCP sessions on a live Linux system with minimal overhead.
ZFS on Linux: The Basics
Set up OpenZFS on Linux: create pools with mirroring or RAID-Z, manage datasets with compression and quotas, and use snapshots for instant backups.
How to Tune Kernel Parameters with sysctl
Learn how to tune Linux kernel parameters at runtime and permanently using sysctl and /etc/sysctl.d, with practical network and VM tunables explained.
The Linux Framebuffer Console
Understand Linux framebuffer internals, the fbdev-to-DRM/KMS evolution, and how to set a crisp high-resolution console with the right kernel parameters.
Software RAID on Linux with mdadm
Build and manage Linux software RAID arrays with mdadm: choose the right RAID level, create and persist the array, monitor health, replace a failed disk, and handle boot safely.
How to Set Up KVM Virtualization
Set up KVM/QEMU virtualization on Linux with libvirt and virt-manager. Covers hardware checks, installation on Ubuntu, Fedora, and Arch, networking, and creating VMs.
How to Profile Linux Performance
Learn to profile Linux performance using the USE method, perf stat, perf record, flame graphs, and scheduler tracing to systematically find CPU, memory, and I/O bottlenecks.
An Introduction to eBPF
Learn what eBPF is, how the kernel verifier keeps it safe, and how to use bpftrace to trace syscalls, disk I/O, and CPU scheduling with working examples.
An Introduction to cgroups
Learn how cgroups v2 work, how systemd maps services onto the cgroup tree, and how to set CPU, memory, and I/O limits for processes and services.
How to Compile the Linux Kernel
Step-by-step guide to downloading, configuring, compiling, and booting a custom Linux kernel from kernel.org on Debian, Fedora, and Arch Linux.
Assembly Language on Linux: A Starter Guide
Write x86-64 assembly on Linux from scratch: install NASM and GAS, learn syscalls, assemble and link a working program, then inspect and debug it.
AI and Artificial-Life Tools on Linux
Set up open-source AI/ML and artificial-life toolkits on Linux: PyTorch, JAX, DEAP, Avida, NetLogo, and RL environments with GPU driver guidance.