$linuxjunkies
>

Linux guides

32 guides in Performance & Advanced · advanced.

Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 10 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

PostgreSQL Performance Tuning

Tune PostgreSQL 15/16 with pg_stat_statements for query visibility, smarter autovacuum thresholds, targeted indexing, and parallel query execution.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 11 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 9 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 14 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 9 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 10 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 11 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 10 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 14 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 9 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 10 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 9 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 11 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 9 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 10 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 10 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
Performance & Advanced· 12 min read

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.

AdvancedUbuntuDebianFedoraArch
All Linux guides · Linux Junkies