From: Jiri Pirko <jiri@resnulli.us>
To: Stephen Hemminger <stephen.hemminger@vyatta.com>
Cc: jhs@mojatatu.com, davem@davemloft.net, edumazet@google.com,
tgraf@suug.ch, netdev@vger.kernel.org
Subject: Re: inaccurate packet scheduling
Date: Tue, 18 Dec 2012 18:54:09 +0100 [thread overview]
Message-ID: <20121218175409.GA1690@minipsycho.orion> (raw)
In-Reply-To: <e2f71dc7-bee5-41ca-bd64-f4569fa953da@tahiti.vyatta.com>
Tue, Dec 18, 2012 at 05:26:31PM CET, stephen.hemminger@vyatta.com wrote:
>
>
>----- Original Message -----
>> Hi all.
>>
>> Run one of the following 2 scripts on machine A:
>>
>> #!/bin/bash
>> tc qdisc del dev eth0 root
>> sleep 1
>> tc -batch << EOF
>> qdisc add dev eth0 root handle 1: prio bands 2 priomap 0 0 0 0 0 0 0
>> 0 0 0 0 0 0 0 0 0
>> qdisc add dev eth0 parent 1:1 handle 10: pfifo limit 50
>> qdisc add dev eth0 parent 1:2 handle 20 tbf latency 100ms rate 4mbit
>> burst 2m
>> filter add dev eth0 parent 1: protocol ip u32 match ip dst
>> $machineB_ip flowid 1:2
>> EOF
>>
>> #!/bin/bash
>> tc qdisc del dev eth0 root
>> sleep 1
>> tc -batch << EOF
>> qdisc add dev eth0 root handle 1: prio bands 2 priomap 0 0 0 0 0 0 0
>> 0 0 0 0 0 0 0 0 0
>> qdisc add dev eth0 parent 1:1 handle 10: pfifo limit 20
>> qdisc add dev eth0 parent 1:2 handle 20: pfifo limit 20
>> filter add dev eth0 parent 1: protocol ip pref 10 \
>> u32 match ip dst $machineB_ip \
>> flowid 1:2 \
>> police rate 4Mbit burst 2m conform-exceed drop
>> EOF
>>
>> And run:
>> [machineB ~]# iperf -s
>> [machineA ~]# iperf -c machineB_ip -t 60
>>
>> Expected results are: ~3.8-4.2 Mbits/s
>> But actual results are: ~130-170 Kbits/s with tbf, ~70-300 Kbits/s
>> with policy rate
>>
>> [machineA ~]# tc -s qdisc list dev eth0
>> qdisc prio 1: root refcnt 9 bands 2 priomap 0 0 0 0 0 0 0 0 0 0 0 0
>> 0 0 0 0
>> Sent 1512384 bytes 1032 pkt (dropped 729, overlimits 0 requeues 0)
>> backlog 0b 0p requeues 0
>> qdisc pfifo 10: parent 1:1 limit 50p
>> Sent 4560 bytes 32 pkt (dropped 0, overlimits 0 requeues 0)
>> backlog 0b 0p requeues 0
>> qdisc tbf 20: parent 1:2 rate 4000Kbit burst 2Mb lat 100.0ms
>> Sent 1507824 bytes 1000 pkt (dropped 729, overlimits 0 requeues 0)
>> backlog 0b 0p requeues 0
>>
>>
>> Tested with kernel pulled from linus's git today. This happens with
>> older
>> kernels as well (I tried 2.6.32-based rhel6 kernels).
>>
>> This happens to me on following machines:
>> HP DL360G8 (x86_64) http://people.redhat.com/jpirko/aThoo2Ei/dl380g8/
>> HP DL360G3 (i686)
>> IBM JS22 (ppc64) http://people.redhat.com/jpirko/aThoo2Ei/ibmjs22/
>>
>> On following machines, I do not observe this issue:
>> qemu kvm (x86_64)
>> IBM Zseries (s390x) http://people.redhat.com/jpirko/aThoo2Ei/ibmz/
>>
>> Please ask in case you need me to provide any other details.
>>
>> Thanks.
>
>Check kernel log for messages about clock. It could be that on the
>machines with issues TSC is not usable for kernel clock.
No such messages in log
>Also turn off TSO since it screws up any form of rate control.
Turning off TSO did not help. However, turning off scatter-gather
helped, on both HP DL360G8 (igb) and IBM JS22 (ehea).
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-12-18 18:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 15:04 inaccurate packet scheduling Jiri Pirko
2012-12-18 16:26 ` Stephen Hemminger
2012-12-18 16:51 ` Eric Dumazet
2013-01-02 15:26 ` Jiri Pirko
2013-01-02 16:34 ` Eric Dumazet
2013-01-08 13:30 ` Jiri Pirko
2013-01-24 8:05 ` Jiri Pirko
2013-01-24 14:01 ` Eric Dumazet
2013-01-29 12:23 ` Jiri Pirko
2013-01-29 16:13 ` Eric Dumazet
2013-01-30 12:14 ` Jiri Pirko
2013-02-07 16:13 ` Jiri Pirko
2013-02-07 16:39 ` Eric Dumazet
2013-02-07 17:39 ` Jiri Pirko
2013-02-07 17:47 ` Eric Dumazet
2013-02-07 18:56 ` Jiri Pirko
2012-12-18 17:54 ` Jiri Pirko [this message]
2012-12-18 18:06 ` Eric Dumazet
2012-12-18 18:40 ` Jiri Pirko
2012-12-18 18:43 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121218175409.GA1690@minipsycho.orion \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=stephen.hemminger@vyatta.com \
--cc=tgraf@suug.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).