Resources

The Kernel Tuning Manual

Peak Performance: Latency, Scheduling, and Sysctl Optimization.

The Strategy

Most operating systems use a "One Size Fits All" kernel. They prioritize "General Purpose" workloads, leading to high latency and sluggishness during heavy tasks. Tebian is built for Performance. This guide explains how to tune the Linux kernel for zero-latency desktop and gaming performance.

We use a set of **Sysctl** and **Kernel Parameters** that prioritize interactive tasks (like your mouse and keyboard) over background maintenance.

1. The CPU Governor

Tebian's "Performance Mode" includes a pre-configured CPU Governor setup. We switch your CPU from powersave to performance or schedutil based on load.

  • Performance Governor: Locks your CPU to its maximum frequency, eliminating the delay of frequency scaling.
  • Schedutil: Uses the kernel's scheduler data to adjust frequency more intelligently than the legacy ondemand.
  • Intel P-States: We optimize the P-State driver for modern Intel CPUs.

2. Memory & Swappiness

Tebian optimizes how your system uses its RAM. By default, Linux is too aggressive about using "Swap" (disk space) even when you have free RAM. We change this at the C-level.

  • Vm.Swappiness=10: Tells the kernel to use your physical RAM as much as possible before touching the disk.
  • ZRAM: We enable compressed RAM swap to simulate having 50% more memory with zero latency.
  • Dirty Cache: We increase the dirty cache limits to allow for smoother background writes.

3. Latency & Scheduling

Tebian uses the BFQ (Budget Fair Queuing) I/O scheduler for mechanical drives and the Kyber scheduler for SSDs. These are tuned for "interactive" performance, meaning your app won't hang when your system is busy.

  • PREEMPT_DYNAMIC: We use the dynamic preemption kernel to switch between low-latency and throughput modes at runtime.
  • Network Buffers: We increase the TCP buffer sizes for smoother, faster internet.

4. Zen & XanMod Kernels

For those who need the absolute best, Tebian provides a one-click setup for the XanMod or Zen kernels. These are community-tuned kernels that include patches for better gaming and desktop responsiveness.

  • Zen Kernel: The official kernel for many performance distros (like Garuda).
  • XanMod Kernel: A highly optimized, stable kernel with advanced scheduling.
  • Liquorix: The best kernel for ultra-low latency audio and gaming.

Why Kernel Tuning on Tebian?

Because our OS is minimal (16MB base), kernel tuning has a **Magnified Effect**. When the kernel is only managing a few processes, every optimization goes directly into your app's performance. You aren't just "tuning a machine"; you are perfecting a tool. One ISO. One menu. Peak performance.