Bug #1673
Support for 64-bit net_rx and net_tx counters
Status: | Closed | Start date: | 11/30/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | Release 4.0 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | OpenNebula 3.8 |
Description
Current version of OpenNebula does not support network usage counters above 2GB (32-bit). The net_rx and net_tx counters are 32-bit signed integer. When a VMM POLL request reports usage above 2,147,483,647 bytes, OpenNebula is unable to parse the counter and will not update the counter in the VM monitoring entry.
This patch adds support for 64-bit signed long long net_rx and net_tx counters.
Associated revisions
Bug #1673: Add support for 64-bit net_tx/net_rx counters. Contributed by Simon Boulet.
Bug #1673: Add support for 64-bit net_tx/net_rx counters. Contributed by Simon Boulet.
Bug #1673: Add support for 64-bit net_tx/net_rx counters. Contributed by Simon Boulet.
(cherry picked from commit 5d54095119d0ec652edbf71e0ba3967c62734f4b)
History
#1 Updated by Carlos MartÃn over 8 years ago
Hi,
Thanks for the patch.
Since we are going to change to the 4.x series, I wonder if we should go a step further and change it to unsinged 64b, and measured in MB, not Bytes
#2 Updated by Simon Boulet over 8 years ago
Hi Carlos,
Thanks for your feedback.
I don't think making the measurements in MB instead of bytes is a good idea. It's quite common to measure network usage in bytes. SNMP for example reports network usage in bytes, and most graphing tools such as MRTG use bytes. Also I don't think it's necessary, the maximum value for a signed 64-bit is 9,223,372,036,854,775,807, or about 8,589,934,592 GB (assuming we use bytes counters). If my calculations are right, a VM that would be directly attached to a full Gigabit link (125MB per second) would take about 2179 years to reach the limit.
At first I wanted to propose an unsigned 64-bit patch, but the OpenNebula core seems to be initializing counters to -1, and also seems to be using -1 to detect polling errors.
I'd love to see my patch go through the next revision. It's simple enough and doesn't seems to be breaking anything for me.
Simon
#3 Updated by Ruben S. Montero over 8 years ago
- Status changed from New to Closed
- Target version set to Release 4.0
- Resolution set to fixed
Applied as is in master.
Thank you very much for your contribution!