[Openstack] eventlet weirdness

Jay Pipes jaypipes at gmail.com
Fri Mar 2 20:50:14 UTC 2012


On 03/02/2012 02:27 PM, Vishvananda Ishaya wrote:
>
> On Mar 2, 2012, at 7:54 AM, Day, Phil wrote:
>
>>> By "properly multi-threaded" are you instead referring to making the nova-api server multi-*processed* with eventlet greenthread pools in each process? i.e. The way Swift (and now Glance) works? Or are you referring to a different approach entirely?
>>
>> Yep - following your posting in here pointing to the glance changes we back-ported that into the Diablo API server.   We're now running each API server with 20 OS processes and 20 EC2 processes, and the world looks a lot happier.  The same changes were being done in parallel into Essex by someone in the community I thought ?
>
> Can you or jay write up what this would entail in nova?  (or even ship a diff) Are you using multiprocessing? In general we have had issues combining multiprocessing and eventlet, so in our deploys we run multiple api servers on different ports and load balance with ha proxy. It sounds like what you have is working though, so it would be nice to put it in (perhaps with a flag gate) if possible.

We are not using multiprocessing, no.

We simply start multiple worker processes listening on the same socket, 
with each worker process having an eventlet greenthread pool.

You can see the code (taken from Swift and adapted by Chris Behrens and 
Brian Waldon to use the object-oriented Server approach that 
Glance/Keystone/Nova uses) here:

https://github.com/openstack/glance/blob/master/glance/common/wsgi.py

There is a worker = XXX configuration option that controls the number of 
worker processes created on server startup. A worker value of 0 
indicates to run identically to the way Nova currently runs (one process 
with an eventlet pool of greenthreads)

Best,
-jay




More information about the Openstack mailing list