Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add range_start and range_end agrs when query vm by a single id #50056

Merged
merged 1 commit into from Dec 20, 2018

Conversation

YouhuaLi
Copy link
Contributor

SUMMARY

now get_vm_by_id need iterate all vms in pool and this is very slow when user has a large vm pool. After adding 'range_start' and 'range_end', the performance is much better than before.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

opennebula

ADDITIONAL INFORMATION

I have 8000+ vms in my Opennebula cluster, so the performance matters a lot. Below is a the comparison result between before and after the change.

---------before change-----
time ansible -m one_vm -a "api_url='https://xxxx:2633/RPC2' instance_ids=xxxx" localhost -vvv
....
real	0m51.714s
user	0m49.952s
sys	0m2.932s
----------after change------
time ansible -m one_vm -a "api_url='https://xxxx:2633/RPC2' instance_ids=xxxx" localhost -vvv
...
real	0m1.165s
user	0m0.908s
sys	0m0.244s

@ansibot
Copy link
Contributor

ansibot commented Dec 18, 2018

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 cloud community_review In order to be merged, this PR must follow the community review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. performance support:community This issue/PR relates to code supported by the Ansible community. labels Dec 18, 2018
@ilicmilan
Copy link
Contributor

shipit
Thanks for your contribution, @YouhuaLi ! Much appreciated

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Dec 18, 2018
@kustodian
Copy link
Contributor

shipit

@ansibot ansibot added automerge This PR was automatically merged by ansibot. shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. labels Dec 20, 2018
@ansibot ansibot merged commit 53eb3ad into ansible:devel Dec 20, 2018
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 automerge This PR was automatically merged by ansibot. cloud feature This issue/PR relates to a feature request. module This issue/PR relates to a module. performance shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants