Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Pawan Singh <psingh@silver-peak.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: A question about MTUs and TCP stack
Date: Sun, 21 Aug 2011 22:05:05 +0200	[thread overview]
Message-ID: <1313957105.2598.10.camel@edumazet-laptop> (raw)
In-Reply-To: <A55791AD2520D54CA92150D16630D03B36116A5B@VA3DIAXVS1F1.RED001.local>

Le mardi 16 août 2011 à 11:33 -0700, Pawan Singh a écrit :
> Hi
> 
> I am posting this question to "netdev" mailing list because I could no
> longer find "linux-net" mailing list.
> 
> I find that the Linux TCP stack consumes huge amount of CPU if the MTU
> of an interface is set to 2400 and it is receiving 1000 byte Ethernet
> packets. On the other hand, if the MTU is set to 1500, the CPU
> consumption is reduced drastically. Increased CPU usage causes network
> throughput to drop considerably (from 800-900 Mbps to 200 Mbps). My
> kernel version is fedora core 6 and we are using 1 Gig NICs (Intel
> 82546GB and Broadcom NetXtreme BCM5721):
> 
> Linux he7700-tg 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 14:10:25 EST 2007
> x86_64 x86_64 x86_64 GNU/Linux
> 
> I do not know the TCP buffer management internals and how they are
> affected by MTU. Is there some FAQ/information online or do I have to
> open up the source code and try to identify the source of the problem.
> I guess I can also try newer versions of the kernel and see if the
> issue has been resolved.
> 

I suspect you have a CPU problem on the receiver side, not on transmit
one ?

MTU has a direct impact on skb 'truesize'. As the linux tcp stack takes
care of not using too much kernel ram for the sole use of one socket,
you might hit a per socket limit faster with big MTU (and not filled RX
buffers)

When this limit is hit, tcp stack tries to 'collapse' consecutive skbs
to remove the unused parts of skbs. This is a very expensive process.

With a recent kernel, you could use 'perf top' tool and easily spot the
hot paths in kernel.


      parent reply	other threads:[~2011-08-21 20:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-16 18:33 A question about MTUs and TCP stack Pawan Singh
2011-08-19 17:33 ` Rick Jones
2011-08-21 20:05 ` Eric Dumazet [this message]

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=1313957105.2598.10.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=psingh@silver-peak.com \
    /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