← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1410003] [NEW] Performance Issue on Nova API about Nova Quota Usage

 

Public bug reported:

We have a requirement to collect quota usage information at project level with admin role account. We noticed that the only api we can work with currently is to get them one by one:
Request: GET     /v2/{tenant_id}/limits/?tenant_id={tenant_id}
Refer to:
http://docs.openstack.org/api/openstack-compute/2/content/GET_os-used-limits-for-admins-v2_getCustomerLimits__v2__tenant_id__limits__tenant_id__ext-compute_limits_admins.html

In production env, we maintained 1K projects at least. So with this API,
we have to get the summary with 1K http requests.(O(n), n is the number
of projects).

This would cause low performance if we check the quota usages
frequently. I would hope there's an API similar to the way we did for
instances summary(/v2/​{tenant_id}​/servers/detail?all_tenant=True)
which is use a "all_tenants" parameter to return the summary list we
want.

That would totally solve the performance issue we met(O(n) -> O(1)). I just wrote a prototype to get this down and hope it would be helpful to describe the issue. Code link is here:
https://github.com/henryzzq/nova/compare/stable/icehouse?expand=1 

Also attached a design doc about this issue.

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: api

** Attachment added: "private design doc"
   https://bugs.launchpad.net/bugs/1410003/+attachment/4296927/+files/nova_limits_api_entension.docx

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1410003

Title:
  Performance Issue on Nova API  about Nova Quota Usage

Status in OpenStack Compute (Nova):
  New

Bug description:
  We have a requirement to collect quota usage information at project level with admin role account. We noticed that the only api we can work with currently is to get them one by one:
  Request: GET     /v2/{tenant_id}/limits/?tenant_id={tenant_id}
  Refer to:
  http://docs.openstack.org/api/openstack-compute/2/content/GET_os-used-limits-for-admins-v2_getCustomerLimits__v2__tenant_id__limits__tenant_id__ext-compute_limits_admins.html

  In production env, we maintained 1K projects at least. So with this
  API, we have to get the summary with 1K http requests.(O(n), n is the
  number of projects).

  This would cause low performance if we check the quota usages
  frequently. I would hope there's an API similar to the way we did for
  instances summary(/v2/​{tenant_id}​/servers/detail?all_tenant=True)
  which is use a "all_tenants" parameter to return the summary list we
  want.

  That would totally solve the performance issue we met(O(n) -> O(1)). I just wrote a prototype to get this down and hope it would be helpful to describe the issue. Code link is here:
  https://github.com/henryzzq/nova/compare/stable/icehouse?expand=1 

  Also attached a design doc about this issue.

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


Follow ups

References