OpenVZ Forum


Home » General » Support » How to limit traffic per vps?
Re: How to limit traffic per vps? [message #31572 is a reply to message #29335] Thu, 03 July 2008 18:17 Go to previous messageGo to previous message
silentninja is currently offline  silentninja
Messages: 37
Registered: September 2007
Member
It seems to work well since the tc filters and classes show up when I do the
tc filter show dev eth0 parent 1:1
command.. hard to type though, heh

(Before reading next lines "kb" means kbites, "KB" means kbYtes)

But.. it's not filtering anything, I've tried to download a file from one of the VPS limited to 512 kb and it's downloading at 380 KB per second.. it shouldn't go faster than 80 KB/s because it's been limited...

Check my show output (i've modified the script so some vps have a 256 kb limit and a 512 kb limit, the IFSPEED has been set up to 4mbit since I don't want them to get more than that.

[root@vps0 ~]# tc class show dev eth0 parent 1:1
class htb 1:11 parent 1:1 prio 0 rate 256000bit ceil 256000bit burst 1632b cburst 1632b 
class htb 1:1 root rate 4000Kbit ceil 4000Kbit burst 15Kb cburst 2100b 
class htb 1:10 parent 1:1 prio 0 rate 256000bit ceil 256000bit burst 1632b cburst 1632b 
class htb 1:13 parent 1:1 prio 0 rate 512000bit ceil 512000bit burst 1664b cburst 1664b 
class htb 1:12 parent 1:1 prio 0 rate 256000bit ceil 256000bit burst 1632b cburst 1632b 
class htb 1:15 parent 1:1 prio 0 rate 512000bit ceil 512000bit burst 1664b cburst 1664b 
class htb 1:14 parent 1:1 prio 0 rate 256000bit ceil 256000bit burst 1632b cburst 1632b 
class htb 1:16 parent 1:1 prio 0 rate 512000bit ceil 512000bit burst 1664b cburst 1664b 


And this are the filters...
[root@vps0 ~]# tc filter show dev eth0 parent 1:1
filter protocol ip pref 1 u32 
filter protocol ip pref 1 u32 fh 800: ht divisor 1 
filter protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10 
  match c9ebfd5b/ffffffff at 12
filter protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:11 
  match c9ebfd5d/ffffffff at 12
filter protocol ip pref 1 u32 fh 800::802 order 2050 key ht 800 bkt 0 flowid 1:12 
  match c9ebfd5f/ffffffff at 12
filter protocol ip pref 1 u32 fh 800::803 order 2051 key ht 800 bkt 0 flowid 1:13 
  match c9ebfd60/ffffffff at 12
filter protocol ip pref 1 u32 fh 800::804 order 2052 key ht 800 bkt 0 flowid 1:14 
  match c9ebfd61/ffffffff at 12
filter protocol ip pref 1 u32 fh 800::805 order 2053 key ht 800 bkt 0 flowid 1:15 
  match c9ebfd62/ffffffff at 12
filter protocol ip pref 1 u32 fh 800::806 order 2054 key ht 800 bkt 0 flowid 1:16 
  match c9ebfd63/ffffffff at 12


Am I doing something wrong?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [solved] 3ware 9690SA and 2.6.18-53.1.19.el5.028stab053.14
Next Topic: Xfce Openvz
Goto Forum:
  


Current Time: Sat Jul 19 05:01:38 GMT 2025

Total time taken to generate the page: 0.04453 seconds