[openstack-dev] [Quantum] Unit tests and memory consumption

Gary Kotton gkotton at redhat.com
Tue Oct 23 09:58:37 UTC 2012


Hi,
I have been looking into bug 1065276 
(https://bugs.launchpad.net/quantum/+bug/1065276). The problem is that 
the memory is not freed for each unit test. There are essentially two 
consumers:
1. self.api = APIRouter(). This uses 1488K. This is essentially the 
loading of the plugin, creation of database (sqllite) and local data 
structures etc. This is call in the setup method.
2. Database usage - this depends on the test in question.

In the teardown method I have tried a number of things but to no avail:
i. dropping the database - the memory consumption actually increases
ii. clearing the database - same as above (actually I have found a bug 
here but this is not related)
iii. deleting the self.api - no change

In short the memory usage just grows per test. I have also tried doing 
some garbage collection but this too has proved fruitless. We have tried 
using a file for the database but this was very time consuming for the 
unit tests.

Any help will be greatly appreciated.
Thanks
Gary




More information about the OpenStack-dev mailing list