Performance tuning is the process of identifying bottlenecks and optimizing system resources (CPU, memory, storage, network, kernel, applications). We can achieve these Performance tunings by adjusting kernel parameters, memory usage, I/O scheduling, and network stack settings to maximize throughput and minimize latency
The methodology is the same across RHEL, SUSE, and Ubuntu, although package managers and some tools differ.
The Performance Tuning Lifecycle
Performance Issue │ ▼ Collect Baseline │ ▼ Find Bottleneck │ ▼ Tune One Component │ ▼ Validate Improvement │ ▼ Monitor Continuously
Note: Never tune multiple parameters at once—you won't know which change helped or caused a regression.
Note: Please take current settings backup before making any changes.
sudo sysctl -a > "/etc/sysctl-$(date -d "today" +"%Y%m%d%H%M").bak"
1. How to Perform Tuning Across RHEL, SUSE, & Ubuntu
Linux tuning operates across two main tiers: Unified Adaptive Tuning (using TuneD) and Granular Kernel Subsystem Tuning (via sysctl, sysfs, and boot arguments).
A. The Unified Layer: TuneD
TuneD is the standard tuning daemon across RHEL, SUSE (SLES), and Ubuntu. It dynamically or statically applies sets of tuning profiles.
# Install TuneD if not present
RHEL/Rocky: dnf install tuned | SLES: zypper in tuned | Ubuntu: apt install tuned# Start & enable service
systemctl enable --now tuned
# List available system profiles
tuned-adm list
# Check system recommendation
tuned-adm recommend
# Apply a specific profile
tuned-adm profile throughput-performance
Common Enterprise Profiles:
- throughput-performance: Disables power-saving, increases I/O queue sizes, tunes sysctl for high disk/network throughput.
- latency-performance: Minimizes OS latency/jitter by disabling CPU power states and C-states.
- virtual-guest: Optimized for virtual machines running on hypervisors.
- network-latency / network-throughput: Custom network stack optimizations.
B. Subsystem-Level Tuning
When custom profile adjustments are required, tune the following key kernel subsystems:
1. CPU & Scheduler Tuning
2. Memory Subsystem
3. Disk I/O & Filesystems
4. TCP/IP Network Stack Tuning
Before making changes, capture the current state.
Step 1 : CPU & Scheduler Tuning
top ; htop ; mpstat -P ALL 1 ; vmstat 1 ; sar -u 1 10 && check following from outputs
CPU utilizationUser vs system CPU
Idle %
I/O wait
Steal time (important on VMs)
cpupower frequency-set -g performance
Process Affinity & NUMA: Pin CPU cores and memory nodes for high-performance databases or VMs to prevent cross-node memory latency:
numactl --cpunodebind=0 --membind=0 my_application
Swap usage
OOM Killer events
Page faults
HugePages
iostat -xz 1 ; iotop ; df -h ; du -sh * ; lsof ; sar -d && check following from outputs
/etc/sysctl.d/99-network-tuning.conf
# Increase socket backlog connection limitsnet.core.somaxconn = 4096 or 10240net.core.netdev_max_backlog = 10000
# Increase TCP read/write buffer limits (for high-bandwidth links)net.core.rmem_max = 16777216net.core.wmem_max = 16777216net.ipv4.tcp_rmem = 4096 87380 16777216net.ipv4.tcp_wmem = 4096 65536 16777216
# Enable TCP BBR Congestion Control (Kernel 4.9+)net.core.default_qdisc = fqnet.ipv4.tcp_congestion_control = bbrStep 5 : Process Analysis
Zombie process
Blocked process
Filesystem nearly full (>85–90%)
Inode exhaustion
Mount options
OOM
Disk errors
NIC resets
Driver problems
Kernel panic
Post a Comment