Tag

unfair lock

0 views collected around this technical thread.

Youzan Coder
Youzan Coder
Jul 8, 2020 · Backend Development

Druid Connection Pool Performance Optimization: Fair Lock vs Unfair Lock

The article explains how a Druid 1.1.20 connection pool was throttled to ~10k RPS by fair‑locking in recycle(), and how enabling the unfair lock (setUseUnfairLock(true)) doubled single‑machine TPS, raised CPU usage to near 100 % and boosted cluster throughput by about 70 %.

ArthasConnection PoolDatabase
0 likes · 7 min read
Druid Connection Pool Performance Optimization: Fair Lock vs Unfair Lock