Performance Optimizations
Performance Optimizations
This page documents the specific kernel and hardware tweaks applied to Terra (Ryzen 5950X / Ubuntu 24.04) to optimize for container performance, storage throughput, and power efficiency.
⚡ CPU & Power Management
AMD P-State (Active Mode)
- Driver:
amd_pstate=active(EPP - Energy Performance Preference) - Benefit: Allows the kernel to communicate directly with the Zen 3 power management controller. Enables a wider frequency range (550MHz - 5000MHz) and more granular boost control.
- Configuration: Added to
GRUB_CMDLINE_LINUX_DEFAULTin/etc/default/grub.
IRQ Balancing
- Service:
irqbalance(Installed/Enabled) - Benefit: Distributes hardware interrupts (HBA, NVMe, NIC) across all 32 threads. Prevents Core 0 from becoming a bottleneck during high I/O tasks.
🧠 Memory Tuning
Static Hugepages
- Setting:
hugepages=2048(Reserving 4GB total as 2MB pages) - Benefit: Reduces TLB (Translation Lookaside Buffer) misses for memory-heavy apps like Minecraft (Java) and Postgres/AI services.
- Configuration: Added to
GRUB_CMDLINE_LINUX_DEFAULTin/etc/default/grub.
Kernel Memory Guard
- Setting:
init_on_alloc=0 - Benefit: Disables the sanitization (zeroing) of memory pages at allocation time, reducing CPU overhead for high-frequency memory operations.
🎮 GPU Optimization (Quadro P2200)
Persistence Mode
- Command:
sudo nvidia-smi -pm 1 - Benefit: Keeps the Nvidia driver loaded in memory regardless of active load. Eliminates the 1-2 second initialization delay when a container (Immich, OpenWebUI) calls the GPU for transcoding or inference.
🛡️ Future Considerations
- ZFS Dirty Ratio: Potential tuning for smoother HDD write buffering.
- PBO (Precision Boost Overdrive): To be verified in UEFI/BIOS for improved multi-core boosting.