* A question about MTUs and TCP stack
@ 2011-08-16 18:33 Pawan Singh
2011-08-19 17:33 ` Rick Jones
2011-08-21 20:05 ` Eric Dumazet
0 siblings, 2 replies; 3+ messages in thread
From: Pawan Singh @ 2011-08-16 18:33 UTC (permalink / raw)
To: netdev@vger.kernel.org
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.
-Pawan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: A question about MTUs and TCP stack
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
1 sibling, 0 replies; 3+ messages in thread
From: Rick Jones @ 2011-08-19 17:33 UTC (permalink / raw)
To: Pawan Singh; +Cc: netdev@vger.kernel.org
On 08/16/2011 11:33 AM, Pawan Singh wrote:
> 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
Based on my experience, you are best off using much more contemporary
kernels when bringing things to the attention of the netdev list. The
list is much more concerned with current bits than those from years past.
Issues with bits from years past are probably best addressed towards the
distro(s) using them, if any.
Looking into getting a oprofile profile of the behaviour, particularly
if it still exists in a contemporary kernel would probably be a good idea.
Also good ideas would be checking the netstat statistics before and
after a test run, and looking at packet traces. You want to look for
things like stats on collapsing buffers and packets being dropped.
rick jones
>
> 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.
>
> -Pawan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: A question about MTUs and TCP stack
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
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2011-08-21 20:05 UTC (permalink / raw)
To: Pawan Singh; +Cc: netdev@vger.kernel.org
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-21 20:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).