-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux Performance Tuning
Complete beginner-friendly guide to performance tuning on Linux, covering Arch Linux, CachyOS, and other distributions including CPU optimization, memory management, I/O optimization, kernel parameters, and system tweaks.
- CPU Optimization
- Memory Management
- I/O Optimization
- Kernel Parameters
- System Tweaks
- CachyOS Performance Benefits
- Troubleshooting
Set governor:
# Install cpupower
sudo pacman -S cpupower
# Set performance
sudo cpupower frequency-set -g performance
# Set ondemand
sudo cpupower frequency-set -g ondemandSet affinity:
# Set CPU affinity
taskset -c 0,1 commandConfigure swappiness:
# Check current
cat /proc/sys/vm/swappiness
# Set swappiness
echo 10 | sudo tee /proc/sys/vm/swappiness
# Make permanent
echo "vm.swappiness=10" | sudo tee -a /etc/sysctl.d/99-sysctl.confConfigure THP:
# Disable THP
echo never | sudo tee /sys/kernel/mm/transparent_hugepage/enabled
# Make permanent
echo "never" | sudo tee /sys/kernel/mm/transparent_hugepage/enabledSet scheduler:
# Check scheduler
cat /sys/block/sda/queue/scheduler
# Set scheduler
echo noop | sudo tee /sys/block/sda/queue/scheduler
# Make permanent
# Add to /etc/udev/rules.d/60-ioschedulers.rulesEdit GRUB:
# Edit GRUB
sudo vim /etc/default/grubAdd parameters:
GRUB_CMDLINE_LINUX_DEFAULT="... mitigations=off"
Regenerate:
sudo grub-mkconfig -o /boot/grub/grub.cfgPerformance tweaks:
# Edit sysctl
sudo vim /etc/sysctl.d/99-performance.confAdd:
# Performance tweaks
vm.swappiness=10
vm.vfs_cache_pressure=50
kernel.sched_migration_cost_ns=5000000
CachyOS uses BORE scheduler which provides:
- Lower input lag: Prioritizes interactive tasks
- Better responsiveness: Games and desktop feel more responsive
- Consistent frame times: Smoother performance
No configuration needed - works automatically on CachyOS.
CachyOS packages are optimized:
- LTO: Link-time optimization
- PGO: Profile-guided optimization
- BOLT: Binary optimization
Result: Faster application startup and better performance.
See CachyOS Performance Guide for detailed CachyOS optimizations.
See CachyOS System Tweaks for CachyOS-specific tweaks.
Check resources:
# Check CPU
top
# Check memory
free -h
# Check I/O
iostatThis guide covered performance tuning for Arch Linux, CachyOS, and other distributions, including CPU, memory, I/O optimization, and CachyOS-specific benefits.
- CachyOS Performance Guide - CachyOS optimizations
- CachyOS System Tweaks - CachyOS tweaks
- Power Management - Power management
- ArchWiki Performance: https://wiki.archlinux.org/title/Improving_performance
This guide covers Arch Linux, CachyOS, and other Linux distributions. CachyOS-specific performance benefits are highlighted where applicable.