twitter/querulous — pull request #47 by rvpgithub (2012-03-27 07:55:00+00:00)
Title: Implement per-thread connection caching in async querulous

The current model of using acquiring/releasing connections per query does not really make sense when there is a thread-per-connection in the async querulous work pool. This leads to avoidable lock contention on the pool and hence expensive context switches.

In a Twitter flockdb deployment, this fix resulted in 20-25% lower CPU usage due to the reduced context switches.