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

Joe Gordon joe.gordon0 at gmail.com
Wed Jul 23 22:39:02 UTC 2014


On Wed, Jul 23, 2014 at 9:41 AM, Chris Friesen <chris.friesen at windriver.com>
wrote:

>
> 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?


Nova-api and nova-conductor use the same logic to fork off multiple
workers, and we run with multiple conductor workers in the gate.

http://logs.openstack.org/62/107562/9/check/check-tempest-dsvm-full/50adcf5/logs/screen-n-cond.txt.gz#_2014-07-23_04_31_52_292


>
> 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
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140723/d1f221bf/attachment.html>


More information about the OpenStack-dev mailing list