Interview Prep/Linux/Performance & the USE Method

How do too many threads or processes hurt performance?

IntermediateProductionPerformance & the USE Method
Answer

Each thread costs memory (stack, often 8 MiB virtual) and scheduler time. When runnable threads far exceed cores, context switching (cs in vmstat, pidstat -w) and cache thrashing waste CPU, and lock contention rises. Symptoms: high %sy, high cs, throughput flat or dropping while CPU climbs. Fix with bounded worker pools sized to cores and I/O behaviour.

All Linux questions Roadmap: Linux

More on Performance & the USE Method