Work out lock contention estimate instantly with clear inputs, formula shown and shareable results.
A row lock held for h milliseconds caps that row at 1000/h updates per second no matter how much hardware you add. Treating the lock as a single server queue, wait time grows as rho/(1-rho), so contention is invisible until utilisation nears one and then becomes catastrophic. Concentrating updates on a counter row is the classic way to hit this wall.
Lock contention
per-row rate = contended TPS / hot rows; utilisation = per-row rate x hold time; wait = utilisation x hold / (1 - utilisation); ceiling = 1000 / hold time in ms
Shard the counter across many rows and sum on read, move the aggregation to an asynchronous job, or use an atomic increment that holds the lock for microseconds instead of milliseconds.
Because wait time is non-linear in utilisation. Traffic growth of ten percent can take a lock from 85 to 95 percent utilisation, tripling the wait.