openstack team mailing list archive
Mailing list archive
Re: Memory leaks from greenthreads
> Has there been any thinking around only using eventlet/greenlet for webserver endpoints and using something like multiprocessing for everything else?
I was already beginning to think that this would be a good blueprint/discussion topic for the design summit ;-)
We've seen a number of issues with the eventlet approach in the computer & network manager where a long running activity (such as updating all security groups, creating and uploading a snapshot) will block any other activities. Whilst it's possible to work round the first of these types of issues by planting sleep(0) statements in the loop, snapshot upload is still a problem.
Of course making everything thread safe isn't going to be trivial, although there is lock code in place for things like iptables I suspect that there are a whole bunch of other timing / concurrency issues that we'll find once we move to a full threaded model.
From: openstack-bounces+philip.day=hp.com@xxxxxxxxxxxxxxxxxxx [mailto:openstack-bounces+philip.day=hp.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of Joshua Harlow
Sent: 29 February 2012 21:26
To: Vishvananda Ishaya; openstack
Subject: Re: [Openstack] Memory leaks from greenthreads
Just a thought I was having, that others might want to chime in on.
Has there been any thinking around only using eventlet/greenlet for webserver endpoints and using something like multiprocessing for everything else?
I know its a fundamental change, but it would force people to think about how to break up there code into something that would work with a message passing architecture (this is already happening with nova + rabbitmq). Nova is a good example, but my thought was to go even further and have anything that needs to run for a long time (ie a equivalent of a nova manager) that is shared inside a application also be a separate "process" with a queue for message passing. Then maybe eventlet/greenlet isn't needed at all? This would force good interfaces, and we wouldn't have to worry about missing a monkey patch. Maybe the python people plan for multiprocess to replace eventlet/greenlet in the end anyway???
On 2/29/12 12:48 PM, "Vishvananda Ishaya" <vishvananda@xxxxxxxxx> wrote:
We have had a memory leak due to an interaction with eventlet for a while that Johannes has just made a fix for.
Unfortuantely, I don' t think we have a decent workaround for nova while that patch is upstreamed. I wanted to make sure that all of the distros are aware of it in case they want to carry an eventlet patch to prevent the slow memory leak.