← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1302467] Re: Logging on list operations slows down operation by about 500%

 

** Also affects: neutron/havana
   Importance: Undecided
       Status: New

** Changed in: neutron/havana
       Status: New => Fix Committed

** Changed in: neutron/havana
    Milestone: None => 2013.2.4

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1302467

Title:
  Logging on list operations slows down operation by about 500%

Status in OpenStack Neutron (virtual network service):
  Fix Released
Status in neutron havana series:
  Fix Committed

Bug description:
  On list operations, every attribute for every item returned by the
  plugin is checked by the policy engine to see whether the user has
  rights to see it [*], assuming the attribute map specifies
  enforce_policy=True for that attribute

  However, in most cases no policies are actually defined for those attributes; in this case the neutron server emits a log.debug statement for the specific attribute saying no policy was found.
  This statement is then repeated for every attribute without policy times the number of items in the response.
  Simple instrumenation shows list operations take in the API layer more than 500% the time they take in the plugin.
  The time is wasted after the plugin call completes and more precisely while doing policy checks.

  While other optimisations might be performed (such as not repeating
  checks already performed, and not triggering init() for each check),
  the biggest offender is the log statement.

  Some measurements are available here:
  http://paste.openstack.org/show/75069/

  
  * I believe this is wrong as well, but that's another story

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1302467/+subscriptions


References