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

Improvements for bandwidth configuration of network offering #10189

Open
akrasnov-drv opened this issue Jan 15, 2025 · 3 comments
Open

Improvements for bandwidth configuration of network offering #10189

akrasnov-drv opened this issue Jan 15, 2025 · 3 comments

Comments

@akrasnov-drv
Copy link

akrasnov-drv commented Jan 15, 2025

ISSUE TYPE
  • Improvement Request
COMPONENT NAME

Network offerings

CLOUDSTACK VERSION
4.20.0.0
OS / ENVIRONMENT

Ubuntu 22.04 (if relevant)
mysql 8

SUMMARY

All default network offerings are shown in UI as having 200Mb/s network rate. I created my own network offering without specifying network rate, and it's also shown in UI as having 200Mb/s.
Then I checked database and found that no network offering has a positive value in network_offerings table. All System ones have 0, while all other (default) ones have NULL.
But then, when I checked xml of Virtual router (I use isolated network with nat, if relevant again), I found this definition on my external network

<source bridge='public'/>
      <bandwidth>
        <inbound average='25600' peak='25600'/>
        <outbound average='25600' peak='25600'/>
      </bandwidth>

That is 25Mb/s.

After I set network rate to 65K in my network offering, it become consistent at least between DB and CloudStack UI, VR then got

      <bandwidth>
        <inbound average='8388480' peak='8388480'/>
        <outbound average='8388480' peak='8388480'/>
      </bandwidth>

And another, minor, issue on the way - mysql defines the field as smallint:
nw_rate smallint unsigned DEFAULT NULL COMMENT 'network rate throttle mbits/s'
that does not allow values larger than 65K (worth adding an info on this to UI of creating network offering).
Modern networks can work on a larger speeds (e.g. 800Gb/s). Besides would be nice to be able not to limit it at all.

Thanks,
Alex.

@rajujith
Copy link
Collaborator

rajujith commented Jan 15, 2025

@akrasnov-drv Cloudstack stores the network rate as: Network rate (Mb/s). This gets translated to different units based on the hypervisor and its implementation.

The 200 Mb/s (Megabits) default value is taken from the global configuration network.throttling.rate. Libvirt/domain XML represents this in kilobytes. https://libvirt.org/formatnetwork.html#id4

Could you check the output of 'tc -p class show dev vnetx'

@akrasnov-drv
Copy link
Author

akrasnov-drv commented Jan 15, 2025

Thank you @rajujith, must be I overlooked that global. You are right.

After I set my network offering to 65K, the command you provided returns

class htb 1:1 root leaf 2: prio 0 rate 67107Mbit ceil 67107Mbit burst 0b cburst 0b

and that's corresponds to

average='8388480' peak='8388480'/

in xml.
Looks pretty consistent then.

Then not a bug but rather improvement request

  • to increase allowed maximum
  • to specify accepted maximum in UI
  • and maybe to place some note in UI that the value comes from default and not from network offering definition

Thanks,
Please feel free to move/reformat/close this issue.

@akrasnov-drv akrasnov-drv changed the title Inconsistent / wrong bandwith configuration in network offering Improvements for bandwith configuration of network offering Jan 15, 2025
@akrasnov-drv akrasnov-drv changed the title Improvements for bandwith configuration of network offering Improvements for bandwidth configuration of network offering Jan 15, 2025
@rajujith
Copy link
Collaborator

@akrasnov-drv Yes, it makes sense to add some information in the UI for creating network offerings. It takes the Network rate from the global configuration network.throttling.rate if not specified. Similarly, vm.network.throttling.rate gets applied in the instance default NIC if not specified on the compute offering.
On trying to set a Network rate of 100000 Mb/s on the network offering it fails with the below error:
Unable to persist on DB, due to: Data truncation: Out of range value for column 'nw_rate' at row 1 We could improve this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants