gpt4 book ai didi

tcp - 64k mtu 对 lo 的优势?

转载 作者:可可西里 更新时间:2023-11-01 02:52:35 25 4
gpt4 key购买 nike

我看到了this commit在 Linux 内核中并被它弄糊涂了:

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;

lo 与 TCP 传输有什么关系?它不只是一个环回地址,无论出于何种原因,您都可以在其中查看以太网流量?

最佳答案

由于这是对环回接口(interface)的更改,因此本地接口(interface)的传输性能得到提升。例如,如果您通过 FTP 连接到 127.0.0.1。

关于tcp - 64k mtu 对 lo 的优势?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13831965/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com