
저는 95번째 백분위수 규칙을 사용하는 전용 서버(proxmox-ve-2.6.32: 3.4-165(커널 실행: 2.6.32-42-pve))에 있고 이를 위반하지 않기를 원합니다. 나는 1gbit 링크를 가지고 있고 내 계약은 100mbit에서 95번째 백분위수를 제공합니다. 그래서 저는 대역폭을 항상 100MB로 제한하고 싶습니다.
나는 wondershaper를 아무런 성공 없이 사용하려고 시도했지만 도움이 필요합니다.
#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)
원더셰이퍼가 없는 경우:
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
WonderShaper를 구성합니다.
# wondershaper vmbr0 1000000 1000000
결과...:
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
(6ko/초에서 18ko/초 사이...)
이 테스트 후 wondershaper 구성:
#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
어떤 아이디어가 있나요?
답변1
wondershaper를 사용하여 이 문제를 해결하는 방법을 찾지 못했지만 ethtool을 사용하여 동일한 작업을 수행하는 다른 방법을 찾았습니다.
ethtool -s eth0 speed 100 duplex full