-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Network rate must be multiplied by 125 not 128 #10645
base: main
Are you sure you want to change the base?
Conversation
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.
Change looks good. We need to multiple by 125 when working with Bits. If it would be bytes we would need to convert with 128.
This change looks good to make the proper calculation.
LGTM
@Rubueno , i am assuming you are testing this in production, are you? ;) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10645 +/- ##
=========================================
Coverage 16.30% 16.30%
- Complexity 13448 13449 +1
=========================================
Files 5674 5675 +1
Lines 499203 499254 +51
Branches 60369 60372 +3
=========================================
+ Hits 81408 81427 +19
- Misses 408726 408754 +28
- Partials 9069 9073 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java
Outdated
Show resolved
Hide resolved
In a libvirt domain xml when nw_rate=5000 the kilobytes per second configured in the interface is 640000 which is 5.12 Gbit/s. Which is more than the configured network rate of 5Gbit/s. So instead multiply by 125.
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.
clgtm
@blueorangutan package |
@DaanHoogland 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 ✔️ debian ✔️ suse15. SL-JID 12982 |
Description
This PR fixes a minor bug in the libvirt domain xml concering the interface bandwidth. In a libvirt domain xml when nw_rate=5000 the kilobytes per second configured in the interface is 640000 which is 5.12 Gbit/s. Which is more than the configured network rate of 5Gbit/s. So instead multiply by 125 (1 Megabit = 125 Kilobyte). 5000 * 125 = 625000 KB/s = 5Gbit/s
QoS is defined in Kilobytes per second according to libvirt docs
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
How Has This Been Tested?
Untested, but the change is trivial.
How did you try to break this feature and the system with this change?
N/A