Why can adding more threads make a CPU-bound service slower?
Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Saved automatically
Model Answer & Deep-Dive Explanation
When runnable threads exceed useful CPU capacity, scheduling, context switching, cache disruption, and lock contention can outweigh any parallelism benefit. Shared data may also cause cache-coherence traffic or serialization in critical sections. Measure CPU utilization, run queues, contention, and throughput under a realistic workload. Size worker pools according to CPU, memory, and downstream limits rather than maximizing thread count. For I/O-bound work, more concurrency can help until another bottleneck is reached, but unbounded concurrency can still exhaust memory or overload dependencies.
Related Questions in Computer Networks & OS
What happens under the hood during the TCP 3-Way Handshake and 4-Way Termination?
Intermediate level • 62 views
What is the difference between Docker Containerization and Kubernetes Container Orchestration?
Intermediate level • 58 views
How does a process differ from a thread?
Easy level • 58 views
What is virtual memory, and why is it useful even when a system has enough RAM?
Easy level • 58 views
What happens step-by-step during a DNS Lookup when typing a URL into the browser?
Intermediate level • 56 views