* [PATCH net-net] net: loopback: set default mtu to 64K
@ 2012-09-24 8:28 Eric Dumazet
2012-09-24 20:24 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2012-09-24 8:28 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
loopback current mtu of 16436 bytes allows no more than 3 MSS TCP
segments per frame, or 48 Kbytes. Changing mtu to 64K allows TCP
stack to build large frames and significantly reduces stack overhead.
Performance boost on bulk TCP transferts can be up to 30 %, partly
because we now have one ACK message for two 64KB segments, and a lower
probability of hitting /proc/sys/net/ipv4/tcp_reordering default limit.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
drivers/net/loopback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 4a075ba..81f8f9e 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -157,7 +157,7 @@ static const struct net_device_ops loopback_ops = {
*/
static void loopback_setup(struct net_device *dev)
{
- dev->mtu = (16 * 1024) + 20 + 20 + 12;
+ dev->mtu = 64 * 1024;
dev->hard_header_len = ETH_HLEN; /* 14 */
dev->addr_len = ETH_ALEN; /* 6 */
dev->tx_queue_len = 0;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-net] net: loopback: set default mtu to 64K
2012-09-24 8:28 [PATCH net-net] net: loopback: set default mtu to 64K Eric Dumazet
@ 2012-09-24 20:24 ` David Miller
2012-09-24 20:33 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2012-09-24 20:24 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 24 Sep 2012 10:28:59 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> loopback current mtu of 16436 bytes allows no more than 3 MSS TCP
> segments per frame, or 48 Kbytes. Changing mtu to 64K allows TCP
> stack to build large frames and significantly reduces stack overhead.
>
> Performance boost on bulk TCP transferts can be up to 30 %, partly
> because we now have one ACK message for two 64KB segments, and a lower
> probability of hitting /proc/sys/net/ipv4/tcp_reordering default limit.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
This gives a nice %13 improvement on my SPARC-T4 box as well.
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-net] net: loopback: set default mtu to 64K
2012-09-24 20:24 ` David Miller
@ 2012-09-24 20:33 ` Eric Dumazet
2012-09-24 20:38 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2012-09-24 20:33 UTC (permalink / raw)
To: David Miller; +Cc: netdev
On Mon, 2012-09-24 at 16:24 -0400, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 24 Sep 2012 10:28:59 +0200
>
> > From: Eric Dumazet <edumazet@google.com>
> >
> > loopback current mtu of 16436 bytes allows no more than 3 MSS TCP
> > segments per frame, or 48 Kbytes. Changing mtu to 64K allows TCP
> > stack to build large frames and significantly reduces stack overhead.
> >
> > Performance boost on bulk TCP transferts can be up to 30 %, partly
> > because we now have one ACK message for two 64KB segments, and a lower
> > probability of hitting /proc/sys/net/ipv4/tcp_reordering default limit.
> >
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
>
> This gives a nice %13 improvement on my SPARC-T4 box as well.
>
> Applied, thanks Eric.
the biggest increase is with
netperf -- -m 63K
I reach 50000 Mbytes/second
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-net] net: loopback: set default mtu to 64K
2012-09-24 20:33 ` Eric Dumazet
@ 2012-09-24 20:38 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-09-24 20:38 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 24 Sep 2012 22:33:16 +0200
> On Mon, 2012-09-24 at 16:24 -0400, David Miller wrote:
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Mon, 24 Sep 2012 10:28:59 +0200
>>
>> > From: Eric Dumazet <edumazet@google.com>
>> >
>> > loopback current mtu of 16436 bytes allows no more than 3 MSS TCP
>> > segments per frame, or 48 Kbytes. Changing mtu to 64K allows TCP
>> > stack to build large frames and significantly reduces stack overhead.
>> >
>> > Performance boost on bulk TCP transferts can be up to 30 %, partly
>> > because we now have one ACK message for two 64KB segments, and a lower
>> > probability of hitting /proc/sys/net/ipv4/tcp_reordering default limit.
>> >
>> > Signed-off-by: Eric Dumazet <edumazet@google.com>
>>
>> This gives a nice %13 improvement on my SPARC-T4 box as well.
>>
>> Applied, thanks Eric.
>
> the biggest increase is with
>
> netperf -- -m 63K
>
> I reach 50000 Mbytes/second
I tested with lmbench bw_tcp, which gives me about 1308 MB/sec.
And indeed that netperf command line gives superior numbers,
about 11747 MB/sec
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-24 20:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-24 8:28 [PATCH net-net] net: loopback: set default mtu to 64K Eric Dumazet
2012-09-24 20:24 ` David Miller
2012-09-24 20:33 ` Eric Dumazet
2012-09-24 20:38 ` David Miller
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).