Path MTU and TCP nodelay

Should MTU be higher or lower when setting tcp_nodelay flag on a connection? I assume it should be higher since the packets gets bigger with the flag? correct me if i'm wrong. Current mtu is 1500

and is it safe to run on a live server with 5k concurrent users or would it require a reboot or ana pplication restart?

 ip link set dev eth0 mtu 5000

Solution 1:

Don't touch the MTU setting unless you're in total control on that network! The MTU has to be equal on all devices connected to a network, otherwise you'll quickly face weird connectivity problems, where a host suddenly doesn't see parts of the traffic.

Furthermore, it doesn't make sense on the Internet. MTU is likely to be limited to 1500b or smaller anyway across the path. You can't expect MTU larger than 1500b outside your own network!

Furthermore, enabling tcp_nodelay doesn't lead to bigger packets. It'll lead to more small packets, as data is sent when it's ready, not when buffer is filled to a certain level or a certain time has elapsed.

So in short: your assumption is wrong, and the result would not be what you believe.