Bandwidth control for each VM

  • Thread starter LANNEX Technologies
  • Start date
L

LANNEX Technologies

Guest
Hello,

Would it be possible to control each VM's bandwidth? Mode: bridges to physical network cards.

One physical server connected to a 5Mbps port from the ISP

Example:

Node-1 on a 5Mbps connection
VM-1 assign 1Mbps
VM-2 assign 1Mbps
VM-3 assign 2Mbps
VM-4 assign 1Mbps
 
Re: Bandwidth control for each VM : 2.0 maybe?

I would love to see this become the default in 2.0 however - along with RRDTool - mrtg to show the traffic used by each (as well as maybe a cpu graph - kinda like munin )

Having these available right from the proxmox interface would make this application a killer.
 
This is un example fo use tc

tc class add dev eth0 parent 1:1 classid 1:103 htb rate 2Mbit prio 1
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 10.20.50.103 flowid 1:103
 
We don't use Lartc. The connection comes from a Cisco router to our cabinet within the datacenter.

I just wonder if it's possible at the command line to edit the bandwidth speeds per VM running on Proxmox VE?

I agree, it would be a great addition within Proxmox to control QoS and bandwidth speeds per VM.
 
Hello,

I attempted to use this myself but got an error:

vps7:~# tc class add dev eth0 parent 1:1 classid 1:103 htb rate 10Mbit prio 1
RTNETLINK answers: No such file or directory

Am I doing something very simple wrong or do I need to run this from a set folder?

Thanks,

Paul Hughes
http://www.ukhost4u.com/
 
I too am running into the same problem trying to limit bandwidth from within a container.. I'm assuming it's not possible, but are there any other suggestions other than at the router?
I'd like to limit container bandwidth either from within the container, or from the proxmox host.
 
I think I have found a solution... For me, I needed to limit the output of a container to the net, so on the HN I did this:

Code:
#!/bin/bash


DEV=eth0
tc qdisc del dev $DEV root
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 1000mbit
tc class add dev $DEV parent 1: classid 1:1 cbq rate 2Mbit allot 1500 prio 5 bounded isolated
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src 1.2.3.4 flowid 1:1
tc qdisc add dev $DEV parent 1:1 sfq perturb 10

where 2Mbit was the output limit I wanted... To limit the input you could change the src in the second to last line to "dst".
 
I agree, it would be a great addition within Proxmox to control QoS and bandwidth speeds per VM.
 
Last edited by a moderator:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!