Question

I saw this commit in the Linux kernel and was confused by it:

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.

--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
static void loopback_setup(struct net_device *dev)
{
-       dev->mtu                = (16 * 1024) + 20 + 20 + 12;
+       dev->mtu                = 64 * 1024;

What does lo have to do with TCP transfers? Isn't it just a loopback address where you look ethernet traffic for whatever reason?

Was it helpful?

Solution

Since this is a change to the loopback interface, it's a performance boost for transfers on the local interface. Like if you FTP to 127.0.0.1, for example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top