wondershaper não está limitando minha largura de banda

0

Eu estou em um servidor dedicado (proxmox-ve-2.6.32: 3.4-165 (executando kernel: 2.6.32-42-pve)) com uma regra de percentil 95 e quero ter certeza de não quebrá-lo. Eu tenho um link de 1gbit e meu contrato me oferece um percentil 95 em 100mbits. Então eu gostaria de limitar minha largura de banda sempre a 100 mbits.

Eu tentei usar o Wondershaper sem sucesso e preciso de ajuda:

#ifconfig
eth0      Link encap:Ethernet  HWaddr xxx
      inet6 addr: xxx/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:273688 errors:0 dropped:0 overruns:0 frame:0
      TX packets:33946 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:409128994 (390.1 MiB)  TX bytes:4016030 (3.8 MiB)
      Interrupt:20 Memory:f7f00000-f7f20000

lo        Link encap:Local Loopback
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:313 errors:0 dropped:0 overruns:0 frame:0
      TX packets:313 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:49781 (48.6 KiB)  TX bytes:49781 (48.6 KiB)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
      inet6 addr: fe80::1/128 Scope:Link
      UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
      RX packets:351 errors:0 dropped:0 overruns:0 frame:0
      TX packets:338 errors:0 dropped:5 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:180727 (176.4 KiB)  TX bytes:109667 (107.0 KiB)

vmbr0     Link encap:Ethernet  HWaddr xxx
      inet addr:xxx  Bcast:xxx  Mask:255.255.255.248
      inet6 addr: xxx/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:35361 errors:0 dropped:0 overruns:0 frame:0
      TX packets:33722 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:392904370 (374.7 MiB)  TX bytes:4002892 (3.8 MiB)

Sem wondershaper:

wget -O /dev/null http://speedtest.dal01.softlayer.com/downloads/test100.zip
--2015-10-15 10:12:35--  http://speedtest.dal01.softlayer.com/downloads/test100.zip
Resolving speedtest.dal01.softlayer.com (speedtest.dal01.softlayer.com)... 74.86.116.210, 2607:f0d0:1003:31::2
Connecting to speedtest.dal01.softlayer.com (speedtest.dal01.softlayer.com)|74.86.116.210|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 104874307 (100M) [application/zip]
Saving to: '/dev/null'

39% [============================================================================>                                                                                                                       ] 41,468,482  27.3M/s              ^C

Eu configuro o wondershaper:

# wondershaper vmbr0 1000000 1000000

Resultado ...:

wget -O /dev/null http://speedtest.dal01.softlayer.com/downloads/test100.zip
--2015-10-15 10:12:56--  http://speedtest.dal01.softlayer.com/downloads/test100.zip
Resolving speedtest.dal01.softlayer.com (speedtest.dal01.softlayer.com)... 74.86.116.210, 2607:f0d0:1003:31::2
Connecting to speedtest.dal01.softlayer.com (speedtest.dal01.softlayer.com)|74.86.116.210|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 104874307 (100M) [application/zip]
Saving to: '/dev/null'

 0% [                                                                                                                                                                                                    ] 61,970      18.4K/s  eta 87m 39s ^C

(entre 6ko / seg e 18ko / seg ...)

Configure o Wondershaper após este teste:

#wondershaper vmbr0
qdisc cbq 1: root refcnt 2 rate 10000Kbit (bounded,isolated) prio no-transmit
 Sent 546883 bytes 776 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
  borrowed 0 overactions 0 avgidle 12500 undertime 0
qdisc sfq 10: parent 1:10 limit 127p quantum 1514b divisor 1024 perturb 10sec
 Sent 15781 bytes 123 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 20: parent 1:20 limit 127p quantum 1514b divisor 1024 perturb 10sec
 Sent 530850 bytes 647 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 30: parent 1:30 limit 127p quantum 1514b divisor 1024 perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
qdisc ingress ffff: parent ffff:fff1 ----------------
 Sent 695844 bytes 1291 pkt (dropped 20, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
class cbq 1: root rate 10000Kbit (bounded,isolated) prio no-transmit
 Sent 252 bytes 6 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
  borrowed 0 overactions 0 avgidle 12500 undertime 0
class cbq 1:1 parent 1: rate 1000Mbit (bounded,isolated) prio 5
 Sent 547619 bytes 772 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
  borrowed 0 overactions 0 avgidle 12500 undertime 0
class cbq 1:10 parent 1:1 leaf 10: rate 1000Mbit prio 1
 Sent 16769 bytes 125 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
  borrowed 0 overactions 0 avgidle 12500 undertime 0
class cbq 1:20 parent 1:1 leaf 20: rate 900000Kbit prio 2
 Sent 530850 bytes 647 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
  borrowed 0 overactions 0 avgidle 12500 undertime 0
class cbq 1:30 parent 1:1 leaf 30: rate 800000Kbit prio 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
  borrowed 0 overactions 0 avgidle 12500 undertime 0

Alguma idéia?

    
por Kevin 15.10.2015 / 17:23

1 resposta

0

Não encontrei o caminho para corrigir esse problema com o Wondershaper, mas descobri uma outra maneira de fazer o mesmo com o ethtool:

ethtool -s eth0 speed 100 duplex full
    
por 21.10.2015 / 12:25