-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add index on cluster_details.name for FirstFitPlanner speedup #7922
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 index on cluster_details.name for FirstFitPlanner speedup #7922
Conversation
Signed-off-by: Marcus Sorensen <mls@apple.com>
yadvr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM didn't test it though
|
@blueorangutan package |
|
@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report
@@ Coverage Diff @@
## 4.18 #7922 +/- ##
=========================================
Coverage 13.06% 13.06%
- Complexity 9093 9096 +3
=========================================
Files 2720 2720
Lines 257431 257456 +25
Branches 40141 40144 +3
=========================================
+ Hits 33622 33634 +12
- Misses 219582 219595 +13
Partials 4227 4227
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
engine/schema/src/main/java/com/cloud/upgrade/dao/DatabaseAccessObject.java
Outdated
Show resolved
Hide resolved
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6935 |
|
@blueorangutan test |
1 similar comment
|
@blueorangutan test |
|
@rohityadavcloud a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Signed-off-by: Marcus Sorensen <mls@apple.com>
weizhouapache
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
|
@blueorangutan package |
|
@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 6936 |
|
@blueorangutan package |
|
@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 6939 |
engine/schema/src/main/java/com/cloud/upgrade/dao/DbUpgradeUtils.java
Outdated
Show resolved
Hide resolved
|
[SF] Trillian test result (tid-7603)
|
|
@blueorangutan package |
|
@mlsorensen a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 6942 |
|
@blueorangutan package |
|
@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6950 |
|
@blueorangutan test matrix |
|
@weizhouapache a [SF] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
|
code lgtm This will be merged when trillian tests finish. |
|
[SF] Trillian test result (tid-7613)
|
|
[SF] Trillian test result (tid-7615)
|
|
[SF] Trillian test result (tid-7614)
|
Description
This PR addresses slowness in FirstFitPlanner, looking for a cluster with capacity for new VM.
Adding an index to
cluster_details.nameyields a ~10x speed improvement in this query, and 2-3x improvement in overall time to create 1000 VMs in parallel during scale testing. The performance of this query is dependent on number of clusters, so one environment is not directly comparable to another.Using slow query logging, creating 1000 VMs with 100 parallel workers on a 100 cluster zone:
Same test after index:
Running the query directly with no load, this query goes from 0.85s to 0.12s when an index is added.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested upgrade path locally:
In case index already exists: