Illustration comparing uniform shipped defaults with limits tuned individually for the workload, raised only where they bind

Performance Tuning

Back to Server Setup · Workload Requirements · Capacity Planning · Request Profiling

Kernel parameters, connection limits, and caching configured for the actual workload rather than left at generic defaults. Defaults are chosen to be safe on an unknown machine — a laptop, a container, a large database server — which means they are rarely right for any of them. Build-time tuning closes the obvious gaps; ongoing work belongs to capacity planning.

1. The Method Matters More Than the Settings

Most tuning advice found online is a list of values to paste in. That approach produces systems nobody understands and occasionally makes things worse. The method we use:

  1. Measure first. Know the current numbers, so any change can be shown to have helped. Without a baseline, tuning is superstition.
  2. Find the actual constraint — CPU, memory, I/O or network. Tuning anything else changes nothing; see request profiling.
  3. Change one thing. Five changes at once means not knowing which helped, and one of them may be hurting.
  4. Measure again under realistic load. Idle benchmarks mislead.
  5. Record it — the value, the reason, the measured effect. A tuned system with no record becomes an untouchable system.

2. Limits That Bite in Production and Never in Testing

A specific class of problem: hard ceilings that are generous for a workstation and low for a busy server. They do not degrade gracefully — the system works, then abruptly refuses connections.

These are worth raising as a matter of course on a dedicated server. They cost nothing when unused and prevent a failure mode that is genuinely hard to diagnose under pressure.

3. Memory Behaviour

4. Storage and Network

5. The Application Layer Is Where the Wins Are

Kernel tuning removes ceilings. It rarely makes a slow system fast. The changes that produce order-of-magnitude improvements are almost always higher up:

6. Make It Survive the Next Rebuild

Tuning applied at the command line lasts until reboot; tuning applied by hand lasts until the machine is rebuilt. Every value goes into configuration management with its comment, so it is reproducible and reviewable — see infrastructure as code. And every limit worth raising is worth monitoring, so you find out when you approach it again rather than when you hit it.

What You Get