[openstack-dev] design question : green thread model

Kevin L. Mitchell kevin.mitchell at rackspace.com
Wed Jan 28 19:23:03 UTC 2015


On Wed, 2015-01-28 at 22:48 +0530, murali reddy wrote:
> On hosts with multi-core processors, it does not seem optimal to run a
> single service instance with just green thread. I understand that on
> controller node, we can run one or more nova services but still it
> does not seem to utilize multi-core processors.

It's also worth pointing out that Python itself isn't all that
parallelizable, even using the core threading packages.  (See [1] for a
write-up about the main block for multiple core utilization in Python,
namely the GIL.)  The upshot is that this is why some components like
nova-api have the capability to fork; but the other components that use
green threads are largely IO-bound, so threading based on IO call
blocking makes sense there.

[1] https://wiki.python.org/moin/GlobalInterpreterLock
-- 
Kevin L. Mitchell <kevin.mitchell at rackspace.com>
Rackspace




More information about the OpenStack-dev mailing list