In 6.0.0 startup can be extremely slow when checking many config items

Bug #1759689 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.config
Fix Released
High
Unassigned

Bug Description

I have a script which imports a nova module which itself imports nova.conf, resulting in all the nova.conf options being checked (during import). In 1.5.2 this goes by quickly. In 1.6.0 it takes minutes.

This appears to happening because of the changes in commit bdba34f7 which adds information about which file a given config option comes from. If nova.conf is involved the number of config options is enormous and the inspect is happening for each time (not each file that has items). 871 times in my tests. inspect, presumably, is not being particularly performant, or something else in the processing nearby.

Before we try to fix this (not sure how) I'll check with jaypipes to make sure that his requirements for the Location feature are still relevant not sure they are.

Initially, I thought this was related to the use of the --config-file argument, but turns out that makes no difference/

In the meantime we may wish to make sure this doesn't get into global-requirements (it's not there yet).

Chris Dent (cdent)
summary: - In 1.6.0 startup can be extremely slow when checking many config items
+ In 6.0.0 startup can be extremely slow when checking many config items
Revision history for this message
Ben Nemec (bnemec) wrote :

FWIW, there were a couple of other issues found with this release that are currently blocking it from g-r, so there's no immediate concern on that front. Clearly we need to fix this before the next release though.

Changed in oslo.config:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.config (master)

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

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

Reviewed: https://review.openstack.org/557513
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=b6cfa2905511fef1f0f179baeadde0b2a2724487
Submitter: Zuul
Branch: master

commit b6cfa2905511fef1f0f179baeadde0b2a2724487
Author: Doug Hellmann <email address hidden>
Date: Wed Mar 28 17:18:32 2018 -0400

    disable stack inspection when setting option values

    Inspecting the stack every time we create an Opt or call
    set_defaults() is too expensive. This patch disables it but leaves the
    code in place to make it easier for someone else to come along and
    work on the performance issue without having to revert the patch
    completely.

    Change-Id: I25bd71ffa49f4232972370a35bf9040e7c45bf70
    Addresses-Bug: #1759689
    Signed-off-by: Doug Hellmann <email address hidden>

Revision history for this message
Ben Nemec (bnemec) wrote :

I think this should be fixed. If not, feel free to reopen.

Changed in oslo.config:
status: Confirmed → Fix Released
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.