Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Admin cli vm-group ls takes extremely long time to list all the tenants. #1104

Closed
ashahi1 opened this issue Mar 28, 2017 · 1 comment
Closed
Assignees
Milestone

Comments

@ashahi1
Copy link
Contributor

ashahi1 commented Mar 28, 2017

Issue: Admin cli vm-group ls takes extremely long time to list all the tenants after VMs were added to the tenants.

For 100 tenants and 2-3 VMs per tenant, admin cli vm-group ls took 40 mins approx.


Test setup, test steps and time duration for each operation is as follows:

Setup:

One ESX - 312 VMs (80 VMs are powered-on and rest are powered-off) 
Docker vm (photon) is on sharedVmfs-0

Test Steps:

1. Created 500 Volumes of 100 mb each sequentially. 
2. After all volumes are created, did docker volume ls  and admin cli volume ls.
3. Created 100 tenants sequentially.
4. After all tenants are created, did admin cli vm-group ls.
5. Added 2-3 VMs per tenant.
6. After VMs were added to each tenants, did admin cli vm-group ls.
7. Added access rule for each tenant 
8. After access rules were added for each tenant, did admin cli vm-group ls.

Time duration for each operation:

1. One volume creation took between 2-3 seconds
2. 500 volumes creation took ~27 mins (1656 seconds)
3. Docker cli volume ls ~2 seconds
4. Admin cli volume ls ~30 seconds
5. One tenant creation took ~2 seconds
6. 100 tenants creation took ~300 seconds
7. Admin cli vm-group ls ~3 seconds
8. Adding one vm to each tenant took ~12 seconds
9. After adding 2-3 VMs per tenant, Admin cli vm-group ls took 45 mins
10.Adding access rule to each tenant took ~2 seconds
11. After adding access rules per tenant, Admin cli vm-group ls took 42 mins

Product Logs:
docker-volume-vsphere.txt
vmdk_ops.log.txt
vmdk_ops.txt

Test Log:
Tenant_Run2.txt

@pdhamdhere
Copy link
Contributor

For each VM in tenant, we invoke get_vm_name_by_uuid

And get_vm_name_by_uuid for each request enumerates all VMs to find VM with requested UUID. For each tenant with 2-3 VMs, this operation takes approx 10Secs.

def get_vm_name_by_uuid(vm_uuid):
...
        vm = [d for d in si.content.rootFolder.childEntity[0].vmFolder.childEntity if d.config.uuid == vm_uuid]
        return vm[0].config.name
...

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

2 participants