also see: http://www.redhat.com/archives/libvir-list/2012-June/msg01306.html
PACKAGE=libpve-common-perl
PACKAGE=libpve-common-perl
run_command("/sbin/tc qdisc add dev $iface handle ffff: ingress");
run_command("/sbin/tc qdisc add dev $iface handle ffff: ingress");
- # this does not work wit virtio - don't know why
- #run_command("/sbin/tc filter add dev $iface parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate ${rate}bps burst ${burst}b drop flowid :1");
- # so we use avrate instead
- run_command("/sbin/tc filter add dev $iface parent ffff: " .
- "protocol ip prio 50 estimator 1sec 8sec " .
- "u32 match ip src 0.0.0.0/0 police avrate ${rate}bps drop flowid :1");
+ # virtio uses large packets 64K, so we need to set mtu to that
+ # value - else filter drops those packets and rate limit does not work.
+ run_command("/sbin/tc filter add dev $iface parent ffff: "
+ "protocol ip prio 50 u32 match ip src 0.0.0.0/0 "
+ "police rate ${rate}bps burst ${burst}b "
+ "mtu 64kb drop flowid :1");
# tbf does not work for unknown reason
#$TC qdisc add dev $DEV root tbf rate $RATE latency 100ms burst $BURST
# tbf does not work for unknown reason
#$TC qdisc add dev $DEV root tbf rate $RATE latency 100ms burst $BURST
+libpve-common-perl (1.0-42) unstable; urgency=low
+
+ * tc: use rate filter with mtu 64k (instead of avrate)
+
+ -- Proxmox Support Team <support@proxmox.com> Mon, 28 Jan 2013 06:59:32 +0100
+
libpve-common-perl (1.0-41) unstable; urgency=low
* correctly count physical sockets
libpve-common-perl (1.0-41) unstable; urgency=low
* correctly count physical sockets