uptimevmstatfreetuned-admsysctl# Load averages over the last 1, 5, and 15 minutes uptime # A snapshot of memory, swap, CPU, and I/O activity vmstat 2 5 # every 2 seconds, 5 times # Memory usage in human-readable form free -h # Disk I/O statistics per device iostat -x 2 # CPU usage broken down per core mpstat -P ALL 2
iostat and mpstat come from the sysstat package, which may need to be installed.| Metric | What It Tells You |
|---|---|
| Load average | Roughly, how many processes were runnable or waiting on I/O, averaged over time |
| %wa (vmstat/top) | Time the CPU spent waiting on I/O — high values often point to a disk bottleneck, not a CPU one |
| free / available (free -h) | Truly unused memory, versus memory that's reclaimable if needed (buffers/cache) |
%wa or iostat before blaming the CPU.tuned applies a coordinated set of settings, a profile, matched to the system's role.
# Show the currently active profile tuned-adm active # List all available profiles tuned-adm list # Switch to a different profile sudo tuned-adm profile throughput-performance # Let tuned recommend a profile based on detected hardware/role tuned-adm recommend
| Example Profile | Optimized For |
|---|---|
balanced | General-purpose default, balancing performance and power savings |
throughput-performance | Server workloads prioritizing throughput over latency |
latency-performance | Workloads sensitive to response time |
virtual-guest | Systems running as a virtual machine guest |
Cap one service's CPU or memory so a runaway service can't starve the rest.
# Limit a service to at most 20% of one CPU core sudo systemctl set-property httpd.service CPUQuota=20% # Cap maximum memory usage sudo systemctl set-property httpd.service MemoryMax=512M # View current resource-related settings for a unit systemctl show httpd.service -p CPUQuota -p MemoryMax
# Equivalent, permanent configuration inside the unit file
[Service]
CPUQuota=20%
MemoryMax=512M
set-property applies immediately and persists by default (add --runtime to make it temporary). A unit file or drop-in documents the limit where others will look for it.# Show all current kernel parameters sysctl -a # Show one specific parameter sysctl vm.swappiness # Change a parameter temporarily (lost on reboot) sudo sysctl -w vm.swappiness=10
# Make a change PERMANENT via a config file
echo "vm.swappiness = 10" | sudo tee /etc/sysctl.d/99-swappiness.conf
sudo sysctl -p /etc/sysctl.d/99-swappiness.conf
# Show swap usage alongside memory free -h # Show configured swap devices swapon --show # Temporarily disable/enable a swap device sudo swapoff /dev/sdb2 sudo swapon /dev/sdb2
vm.swappiness (0–100) sets how readily the kernel swaps. Lower values keep more data in RAM.
httpd to a maximum of 512 MB of memory.sysctl -w differ from adding a setting under /etc/sysctl.d/?vm.swappiness control, and what does a lower value mean?