From: Alexander Duyck <alexander.duyck@gmail.com>
To: Todd Bezenek <bezenek@gmail.com>, netdev@vger.kernel.org
Subject: Re: Cause of Large Latency Difference Between 1179-byte and 1180-byte UDP Frames?
Date: Thu, 21 May 2015 07:55:24 -0700 [thread overview]
Message-ID: <555DF1DC.8020803@gmail.com> (raw)
In-Reply-To: <CAE1W6VpPJwKtFGmeLuStt-A8JjGj2xU8RitonBHBs3dH9pXYRA@mail.gmail.com>
On 05/20/2015 09:50 PM, Todd Bezenek wrote:
> I'm pushing 10,000 frames per second of UDP traffic through a Linux
> system with a bridge configured between two 1GbE ports.
>
> Iptables is installed and running, but the default rule is ACCEPT with
> no other rules.
>
> When I make the packets 1179 bytes in size (total size includes
> Ethernet header, etc.), I see the latency of most packets between 60
> and 200 usec. When I change the size to 1180 bytes, I start seeing
> about 1% of the packets with latencies larger than 300 usec, and some
> as high as 500+ usec.
>
> Any ideas what buffer size, cache line count, TLB reach, etc. might be
> causing this dramatic change?
>
> Cut-and-paste to my terminal is not working, so limited info here:
>
> Kernel: 3.12.20 x86-64
> Processor: Intel E3845 (Atom, 4 cores)
> Network interface driver: Intel igb
>
> Thank you for any helpful pointers.
>
> -Todd
The igb driver defaults to an adaptive interrupt moderation scheme. It
is possible that what you are seeing could be due to that, or it could
possibly be that the time between packets is becoming large enough that
your CPU is starting to go into deeper sleep states.
My first suggestion would be to try disabling sleeps states beyond C1.
To do that you could boot your kernel with the parameter
"processor.max_cstate=1" or "idle=poll". Either one should prevent the
CPU from going into a sleep state but it will consume more power.
You also might try modifying the interrupt moderation to a fixed value
of 10 or more via "ethtool -C <dev> rx-usecs <x>" to see if the behavior
goes away after that. If the device is the cause it might point to a
possible glitch in the interrupt moderation scheme or possibly lost
interrupts for the device or driver.
- Alex
next prev parent reply other threads:[~2015-05-21 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 4:50 Cause of Large Latency Difference Between 1179-byte and 1180-byte UDP Frames? Todd Bezenek
2015-05-21 14:55 ` Alexander Duyck [this message]
2015-05-21 18:33 ` Todd Bezenek
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=555DF1DC.8020803@gmail.com \
--to=alexander.duyck@gmail.com \
--cc=bezenek@gmail.com \
--cc=netdev@vger.kernel.org \
/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).