[openstack-dev] [nova] [all] Excessively high greenlet default + excessively low connection pool defaults leads to connection pool latency, timeout errors, idle database connections / workers
Chris Friesen
chris.friesen at windriver.com
Tue Feb 23 15:37:43 UTC 2016
On 02/23/2016 05:25 AM, Roman Podoliaka wrote:
> So looks like it's two related problems here:
>
> 1) the distribution of load between workers is uneven. One way to fix
> this is to decrease the default number of greenlets in pool [2], which
> will effectively cause a particular worker to give up new connections
> to other forks, as soon as there are no more greenlets available in
> the pool to process incoming requests. But this alone will *only* be
> effective when the concurrency level is greater than the number of
> greenlets in pool. Another way would be to add a context switch to
> eventlet accept() loop [8] right after spawn_n() - this is what I've
> got with greenthread.sleep(0.05) [9][10] (the trade off is that we now
> only can accept() 1/ 0.05 = 20 new connections per second per worker -
> I'll try to experiment with numbers here).
Would greenthread.sleep(0) be enough to trigger a context switch?
Chris
More information about the OpenStack-dev
mailing list