Batch NIC and VLAN reads in collectVmNetworkStatistics to reduce per-NIC DB round-trips#13474
Batch NIC and VLAN reads in collectVmNetworkStatistics to reduce per-NIC DB round-trips#13474vishesh92 wants to merge 2 commits into
Conversation
|
@blueorangutan package |
|
@vishesh92 a [SL] 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❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13474 +/- ##
============================================
- Coverage 17.67% 17.66% -0.01%
- Complexity 15790 15791 +1
============================================
Files 5922 5922
Lines 533173 533204 +31
Branches 65209 65214 +5
============================================
- Hits 94218 94206 -12
- Misses 428309 428353 +44
+ Partials 10646 10645 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 18343 |
…NIC DB round-trips collectVmNetworkStatistics performed per-NIC: search by MAC, listVlansByNetworkId, producing 2 * NIC_COUNT queries per VM. Now batch-loads all NICs by MAC addresses and all VLANs by network IDs upfront (2 queries total for the read side). - Add NicDao.listByMacAddresses(List<String>) for batch MAC lookup - Add VlanDao.listVlansByNetworkIds(List<Long>) for batch network VLAN lookup - Replace per-iteration NIC search + VLAN lookup with map lookups - Write side (lock + update) intentionally unchanged — row-level lock is load-bearing
…n batch NIC/VLAN reads
6c3052f to
03e3ab2
Compare
|
@blueorangutan package |
|
@vladimirpetrov a [SL] 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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18375 |
Description
collectVmNetworkStatistics performed per-NIC: search by MAC, listVlansByNetworkId, producing 2 * NIC_COUNT queries per VM. Now batch-loads all NICs by MAC addresses and all VLANs by network IDs upfront (2 queries total for the read side).
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?