api-server: VMI create takes too long

Bug #1435458 reported by Prakash Bailkeri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Prakash Bailkeri
R2.1
Fix Committed
Undecided
Prakash Bailkeri

Bug Description

If a VMI is created under a project that already has too many VMIs created, the VMI create takes too long.

Most of the time is spent in quota check while reading the project and counting the resources created under it.

This check is performed even if the quota check is disabled for that resource type.

Tags: config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : master

Review in progress for https://review.opencontrail.org/8550
Submitter: Prakash Bailkeri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/8550
Committed: http://github.org/Juniper/contrail-controller/commit/2310b68507a7ec90fa51d0f778ffa32c0e8876ef
Submitter: Zuul
Branch: master

commit 2310b68507a7ec90fa51d0f778ffa32c0e8876ef
Author: Prakash Bailkeri <email address hidden>
Date: Mon Mar 23 10:55:31 2015 -0700

Optimise quota check

while checking the quota for a resource type, the project is read fully and then counted for the resource.
There are two issues
1. this query for project is done even without quota enabled for resource
2. Project read and json encoding is expensive with too many VMIs under it

Solution:
1. Introduce new API for reading child count. (e.g read number of VMI under a project)
2. Check for the resourece count only if quota check is enabled for the resource

Change-Id: I0c054fcf5f855182baef93e14eeeffae8c8993b1
Closes-Bug: 1435458

Changed in juniperopenstack:
status: New → Fix Committed
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.1

Review in progress for https://review.opencontrail.org/8680
Submitter: Prakash Bailkeri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/8680
Committed: http://github.org/Juniper/contrail-controller/commit/745fae6af3e7afc926dc50fa6c03c604e803853c
Submitter: Zuul
Branch: R2.1

commit 745fae6af3e7afc926dc50fa6c03c604e803853c
Author: Prakash Bailkeri <email address hidden>
Date: Mon Mar 23 10:55:31 2015 -0700

Optimise quota check

while checking the quota for a resource type, the project is read fully and then counted for the resource.
There are two issues
1. this query for project is done even without quota enabled for resource
2. Project read and json encoding is expensive with too many VMIs under it

Solution:
1. Introduce new API for reading child count. (e.g read number of VMI under a project)
2. Check for the resourece count only if quota check is enabled for the resource

Change-Id: I0c054fcf5f855182baef93e14eeeffae8c8993b1
Closes-Bug: 1435458

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.