Set osapi_volume_workers equal to number of CPUs

Bug #1333370 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Matt Riedemann
oslo-incubator
Fix Released
Medium
Matt Riedemann

Bug Description

I started a change in devstack here but we decided to move this into Cinder itself:

https://review.openstack.org/#/c/98492/

Nova made the same change for it's API and conductor workers in Icehouse:

https://review.openstack.org/#/c/69266/

Revision history for this message
Matt Riedemann (mriedem) wrote :

Adding oslo since we want to move the nova.utils.cpu_count() method to oslo-incubator's service.py module:

https://review.openstack.org/#/c/69266/1/nova/utils.py

Then cinder can sync up on service.py and use that rather than duplicate the nova code.

Changed in cinder:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/101978

Changed in oslo:
assignee: nobody → Matt Riedemann (mriedem)
status: New → In Progress
Mark McLoughlin (markmc)
Changed in oslo:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/101978
Committed: https://git.openstack.org/cgit/openstack/oslo-incubator/commit/?id=85f178489a128a04a7ee3ed44018403caa109ef0
Submitter: Jenkins
Branch: master

commit 85f178489a128a04a7ee3ed44018403caa109ef0
Author: Matt Riedemann <email address hidden>
Date: Mon Jun 23 11:44:47 2014 -0700

    Move nova.utils.cpu_count() to processutils module

    This moves and renames nova.utils.cpu_count() utility method from nova
    to oslo. Added in commit 75c96a48fc7e5dfb59d8258142b01422f81b0253, this
    is used to set the default number of nova api/conductor workers if not
    explicitly specified in nova.conf.

    I'm moving this to oslo so that we can use the same default worker logic
    in other projects, i.e. cinder, trove, glance and taskflow.

    Closes-Bug: #1333370

    Change-Id: I81748a15f8da85e287afdb5ec9de6369f8919ab0

Changed in oslo:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/103205

Changed in cinder:
assignee: nobody → Matt Riedemann (mriedem)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/103206

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/103205
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=4edc71d51ec03d5e0211cb637f580bbe20c9ce73
Submitter: Jenkins
Branch: master

commit 4edc71d51ec03d5e0211cb637f580bbe20c9ce73
Author: Matt Riedemann <email address hidden>
Date: Fri Jun 27 09:50:56 2014 -0700

    Sync processutils from oslo with deps

    The main target for the sync is to pick up the get_worker_count()
    method in commit 85f178489a128a04a7ee3ed44018403caa109ef0 so that we can
    set osapi_volume_workers equal to the number of CPUs on the host.

    Changes:

    processutils
    ------------
    85f1784 Move nova.utils.cpu_count() to processutils module
    cdcc19c Mask passwords that are included in commands
    8a0f567 Remove str() from LOG.* and exceptions
    51778f9 Allow passing environment variables to execute()
    fcf517d Update oslo log messages with translation domains
    af41592 Catch OSError in processutils
    f773ea2 Fix i18n problem in processutils module
    8b2b0b7 Use hacking import_exceptions for gettextutils._
    3b71f46 Fixed misspellings of common words
    12bcdb7 Remove vim header
    a4dab73 Correct execute() to check 0 in check_exit_code

    importutils
    -----------
    1173e46 Remove ValueError when accessing sys.modules

    jsonutils
    ---------
    0d7296f Add kwargs to jsonutils.load(s) functions

    log
    ---
    109e325 Use oslo.messaging to publish log errors
    de4adbc pep8: fixed multiple violations
    eac71f5 Fix common.log.ContextFormatter for Python 3
    d78b633 Fixes a simple spelling mistake
    621d831 always log a traceback in the sys.excepthook
    90ae24b Remove redundant default=None for config options
    af36c2a Fix logging setup for Python 3.4
    cdcc19c Mask passwords that are included in commands

    strutils
    --------
    8a0f567 Remove str() from LOG.* and exceptions
    fd18c28 Fix safe_encode(): return bytes on Python 3
    302c7c8 strutils: Allow safe_{encode,decode} to take bytes as input

    timeutils
    ---------
    250cd88 Fixed a new pep8 error and a small typo

    Partial-Bug: #1333370

    Change-Id: I7115cb1ae341a995502ca8ba988c12e9168259e0

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/103206
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=6f24ca2496e37f3f75496c0e4191e71e55fd7b5d
Submitter: Jenkins
Branch: master

commit 6f24ca2496e37f3f75496c0e4191e71e55fd7b5d
Author: Matt Riedemann <email address hidden>
Date: Fri Jun 27 10:57:33 2014 -0700

    Use (# of CPUs) osapi_volume_workers by default

    This changes the default number of cinder API workers to be equal to the
    number of CPUs available on the host, rather than defaulting to 1 as it
    did before.

    Commit 75c96a48fc7e5dfb59d8258142b01422f81b0253 did the same thing in
    Nova in Icehouse. Similar changes are being made to Glance and Trove as
    well.

    DocImpact: osapi_volume_workers will now be equal to the number of
               CPUs available by default if not explicitly specified
               in cinder.conf.

    UpgradeImpact: Anyone upgrading to this change that does not have
               osapi_volume_workers specified in cinder.conf will now be
               running multiple API workers by default when they restart
               the cinder-api service.

    Closes-Bug: #1333370

    Change-Id: I8dec104800c18618e0c8422bbb93d5dc19c12876

Changed in cinder:
status: In Progress → Fix Committed
Changed in oslo:
milestone: none → juno-2
status: Fix Committed → Fix Released
Changed in cinder:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.