IT lexicon › Programming › Convoy effect

Convoy effect

Programming På svenska → Updated: 2026-11-16

A performance problem where a slow thread holding a lock prevents all waiting threads from proceeding, creating a "queued" bottleneck.

The convoy effect occurs when multiple threads contend for the same lock. If thread A holds the lock but is descheduled by the OS before releasing it, all other waiting threads (B, C, D, ...) must wait in queue. When the scheduler switches back to a queued thread, it may be thread D wanting only a quick operation — but D cannot proceed until A releases its lock, which may take a long time.

The effect is particularly severe for locks with low timeout or low expected contention, where we expect fast access. Lock-free data structures avoid this problem entirely, and priority inheritance can reduce but not eliminate it.

← Back to the lexicon