Performance Optimization 101
summary
An HTTP server example shows the real bottlenecks and fixes: the acceptor loop suffers from expensive controlling process switches so worker processes accept sockets directly and multiple listeners run in parallel, enabling 100,000 requests/sec. Binary pattern matching beats inbuilt HTTP biff in heavy multicore tests, parsing drops from 46µs to 24µs with the native compiler, and replacing erlang:now with OS timestamp plus ETS caching avoids locks and copies. Profiling uses eflame, nifs stay under ~500µs, GC drops from 325k/s to ~8k/s, and cpusets cut context switches.
AI-written summary · about
chapters (14)
- 0:00Start
- 0:42HTTP API server
- 10:46Gotchas
- 12:29Profiling
- 16:07Micro benchmarks
- 20:56Process Tuning
- 22:13Monitoring
- 24:54VM Stats
- 26:14System Stats
- 26:56System Monitor
- 28:52Dashboard
- 30:09VM Tuning
- 33:53Lock counter
- 34:37Other tools
related talks
26mFrom Microbenchmarks to HTTP2 Load-testing: 5 Performance To...
27mEffective Performance Testing to your Server with Autocannon
02h 44mMeasure, don’t guess: benchmarking stories from the trenches
39mLast-Minute Performance Testing
44mReusable Insights from Enterprise Deployments
40mPerformance and Testing of an Open Source Erlang TCP/IP Stack
14mOptimizing Go code without a blindfold
54mPerformance tests and other lies
