${ipfw} pipe 1 config bw 100Mbit/s
${ipfw} pipe 2 config bw 200Mbit/s
${ipfw} 10 pipe 2 ip from any to any via vlan1541 in
${ipfw} 11 pipe 1 ip from any to any via vlan1541 out
Через некоторое время увидели на графиках, что входящий трафик составил примерно 400Мбит. Оказалось дело в sysctl net.inet.ip.dummynet.io_fast, который у нас был выставлен в режим fast (1).
После установки в режим normal все встало на свои места. Графики (io_fast=1 — около 400Мбит/с, и после включения io_fast=0 — 200Мбит/с):


man 8 ipfw:
There are two modes of dummynet operation: ``normal'' and ``fast''. The
``normal'' mode tries to emulate a real link: the dummynet scheduler
ensures that the packet will not leave the pipe faster than it would on
the real link with a given bandwidth. The ``fast'' mode allows certain
packets to bypass the dummynet scheduler (if packet flow does not exceed
pipe's bandwidth). This is the reason why the ``fast'' mode requires
less CPU cycles per packet (on average) and packet latency can be signif-
icantly lower in comparison to a real link with the same bandwidth. The
default mode is ``normal''. The ``fast'' mode can be enabled by setting
the net.inet.ip.dummynet.io_fast sysctl(8) variable to a non-zero value.
Комментариев нет:
Отправить комментарий