[openstack-dev] [nova] threading in nova (greenthreads, OS threads, etc.)

Chris Friesen chris.friesen at windriver.com
Wed Jul 23 16:41:06 UTC 2014


Hi all,

I was wondering if someone could point me to a doc describing the 
threading model for nova.

I know that we use greenthreads to map multiple threads of execution 
onto a single native OS thread.  And the python GIL results in 
limitations as well.

According to the description at 
"https://bugs.launchpad.net/tripleo/+bug/1203906" for nova-api we 
potentially fork off multiple instances because it's database-heavy and 
we don't want to serialize on the database.

If that's the case, why do we only run one instance of nova-conductor on 
a single OS thread?

And looking at nova-compute on a compute node with no instances running 
I see 22 OS threads.  Where do these come from?  Are these related to 
libvirt?  Or are they forked the way that nova-api is?

Any pointers would be appreciated.

Chris



More information about the OpenStack-dev mailing list