nova/nova/cmd
Peter Feiner 5450f09370 add conf for number of conductor workers
Fixes bug #1213080 and implements blueprint condutor-workers.

Make it easy to launch a bunch of conductor processes on a host.

Deploying multiple conductor workers per host avoids serialization on
database accesses caused by libmysqlclient.so blocking eventlet's
single thread. In an experiment on a 24-core machine, when creating 20
VMs in parallel, maximum creation time was reduced by approx. 10s when
using 20 conductor processes vis-a-vis a single conductor process.
Profiling showed that all of the savings came from faster calls into
nova.db.sqlalchemy.api.

Note that there are alternative methods for preventing the eventlet
thread from blocking during database calls. However, none of these
alternatives performed as well as multiple nova-conductor processes.

    * Instead of using the native database driver like _mysql.so, you
      can use a pure-python driver, like pymysql by setting
      sql_connection=mysql+pymysql://... in the [DEFAULT] section of
      /etc/nova/nova.conf, which eventlet will monkeypatch to avoid
      blocking. The problem with this approach is the vastly greater
      CPU demand of the pure-python driver compared to the native
      driver. Since the pure-python driver is so much more CPU
      intensive, the eventlet thread spends most of its time talking to
      the database, which effectively the problem we had before!

    * Instead of making database calls from eventlet’s thread, you can
      submit them to eventlet’s pool of worker threads and wait for the
      results. Try this by setting dbapi_use_tpool=True in the
      [DEFAULT] section of /etc/nova/nova.conf.  The problem I found
      with this approach was the overhead of synchronizing with the
      worker threads. In particular, the time elapsed between the
      worker thread finishing and the waiting coroutine being resumed
      was typically several times greater than the duration of the
      database call itself.

Change-Id: I8698997d211d7617ee14a1c6113056a694d70620
2013-09-05 20:08:39 +00:00
..
__init__.py Add support for API message localization 2013-09-03 03:12:10 +00:00
all.py Remove the monkey patching of _ into the builtins 2013-07-26 07:31:17 -07:00
api.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
api_ec2.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
api_metadata.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
api_os_compute.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
baremetal_deploy_helper.py Remove the monkey patching of _ into the builtins 2013-07-26 07:31:17 -07:00
baremetal_manage.py Remove the monkey patching of _ into the builtins 2013-07-26 07:31:17 -07:00
cells.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
cert.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
compute.py fix bad usage of exc_info=True 2013-08-29 01:37:48 +08:00
conductor.py add conf for number of conductor workers 2013-09-05 20:08:39 +00:00
console.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
consoleauth.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
dhcpbridge.py Remove use of fake_rabbit in Nova 2013-08-21 11:35:08 +01:00
manage.py Add error checking around host service checking 2013-07-31 10:47:06 -07:00
network.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
novnc.py maint: remove redundant default=None for config options 2013-08-09 02:05:04 +01:00
novncproxy.py Enable no_parent and file_only security 2013-08-07 08:13:15 -07:00
objectstore.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
rpc_zmq_receiver.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
scheduler.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00
spicehtml5proxy.py Enabled hacking check for Python3 compatible print (H233) 2013-07-29 15:26:56 -07:00
xvpvncproxy.py Remove "#!/usr/bin/env python" from .py files under nova/cmd 2013-05-14 21:48:17 +08:00