DAST: Iperf - igorinov --at-- gmx.net
>Date: Fri, 4 Mar 2005 12:07:25 -0600
>To: igorinov --at-- gmx.net
>Subject: DAST: Iperf - igorinov --at-- gmx.net
>
>
>Contacting DAST re: Feature request about Iperf
>From: Ivan Gorinov <igorinov --at-- gmx.net>
>
>Question/Comment:
>Hello!
>Thank you for the great benchmark.
>I've made a patch that enables different queueing priorities:
>
> http://nmonitor.nm.ru/iperf/iperf-2.0.1-ig.patch
>
>Hope it will be useful.
>====
>
>This patch adds a new command line option (-Q), which allows to set
>the socket priority using the SO_PRIORITY socket option.
>
>The socket priority (sk->priority) defines the priority level of all packet
>buffers sent from the socket (skb->priority).
>
>This priority level can be used for:
>
>1. Specifying class ID for kernel packet sheduler
>
>High 16 bits are major class number, low 16 bits are minor.
>The following example creates the Hierarchy Token Bucket queueing discipline
>and classes with limited rate:
>
> # /sbin/tc qdisc add dev eth0 root handle 1:0 htb
> # /sbin/tc class add dev eth0 parent 1:0 classid 1:4 htb rate 400kbit
> # /sbin/tc class add dev eth0 parent 1:0 classid 1:7 htb rate 700kbit
>
>Packets with priority 0x00010004 (65540) will fall into class 1:4,
>which is limited by 400kbit/s:
>
> # ./iperf -c 172.17.0.6 -Q 65540
> ------------------------------------------------------------
> Client connecting to 172.17.0.6, TCP port 5001
> TCP window size: 16.0 KByte (default)
> ------------------------------------------------------------
> [ 3] local 172.16.1.82 port 33974 connected with 172.17.0.6 port 5001
> [ 3] 0.0-10.6 sec 584 KBytes 453 Kbits/sec
>
>Packets with priority 0x00010007 (65543) will fall into class 1:7,
>which is limited by 700kbit/s:
>
> # ./iperf -c 172.17.0.6 -Q 65543
> ------------------------------------------------------------
> Client connecting to 172.17.0.6, TCP port 5001
> TCP window size: 16.0 KByte (default)
> ------------------------------------------------------------
> [ 3] local 172.16.1.82 port 33977 connected with 172.17.0.6 port 5001
> [ 3] 0.0-10.2 sec 944 KBytes 755 Kbits/sec
>
>For more information about traffic control, see iproute2 documentation.
>
>2. Mapping to VLAN (IEEE 802.1Q) frame priority
>
>The TCI.user_priority field of VLAN frame priority is set by socket priority
>according to EGRESS priority mappings:
>
> # /sbin/vconfig set_egress_map eth0.555 65540 3
> # ./iperf -c iperf_server -M 1456 -Q 65540
>
>If "iperf_server" is in VLAN with ID=555, outgoing frames will be tagged with
>signaled user priority=3. Set MSS to 1456 for the network adapters that don't
>support MTU > 1500.
>
>Note: you must be root to perform these tests because only priority values
0-6
>are available for non-root users.
>
>
>
--
Mitch Kutzko | mitch --at-- dast.nlanr.net | mitch --at-- ncsa.uiuc.edu | 217-333-1199
Project: http://dast.nlanr.net/ | Personal: http://hobbes.ncsa.uiuc.edu/