3 ms·
Why isn't it TCP instead of UDP to mitigate lost packet issues?
by voiper1 6y ago
Why isn't it TCP instead of UDP to mitigate lost packet issues?
- blibble 6y agoyou can tell NFS to use TCP
- notacoward 6y agoAFAIK you have to tell it to use UDP, because TCP has been the default in most implementations for a while. Even when I started with v2 in 1990(ish), the issues with NFS over UDP were already known.
- tyingq 6y agoThe rough history is that NFS originally only supported UDP, likely for resource reasons (tcp buffers, for example, are expensive when you have < 64Mb of RAM) and because it was mostly used on local LANS.
- ericbarrett 6y agoThis, and also NFS over TCP was quite slow when it was first introduced, because TCP checksum offloading was not common; as I recall it was about a 15% speed hit versus properly configured UDP, concomitant with higher CPU use, on Solaris 7 (SunOS 5.7).
- hedora 6y agoTCP connections still can drop (your network interface could bounce, for instance), and with NFS, that won’t lead to filesystem corruption, or require special application-level handling. Also, NFS supports clustered servers, so the machine that you sent the rename to might have crashed. The surviving machines need to know what happened with the rename, so when your client reconnects, it can resend the rename and get the right response code.