By Peter Toth
What do you want to learn today?
What level are you interested in? Any specific
requests? Have you ever optimized Linux or an
application for Linux?
Assuming everyone is familiar with Linux
concepts and basic architecture
Start on a clean system
Empty caches - warmup caches
Automate testing (clear caches every time)
Keep those changes which are significant
Think about side-effects
Know your ...
Fix bugs! aka. optimize last
Run at least -O2
Structure the program to be efficient on the
hardware and Linux
structure size alignment (cache-line, IO)
are all POSIX/OS features used?
If in doubt test!
Select hardware for the
Study the hardware you’ve
selected: CPU, HT, memory,
NUMA, SSD, disks, iGPU,
Tweak the SW for the HW
(think SSE, AVX)
Tune HW specifics through
consolidate old hw -> virtualize
turn off unused hardware (isolcpus, network)
scheduler (use tickless)
P states: frequency-voltage combinations
Throughput or latency (RT Linux?)
use your HW
verify link speeds
per socket buffers
TCP congestion control algorithms
tools: ethtool, iperf, netstat, wireshark!