macOS has a very large timeout before returning the thread with a network failure error. Is this by design and expected?
So, the first thing to understand is that this isn't actually a “system-wide" choice/behavior. Each VFS driver has full control over the volume they're presenting, so the actual behavior here is determined and controlled by the VFS driver itself, not the larger system.
Moving to here:
It was observed that for macOS, the maximum return time of the thread was around 10 mins,
So, the actual behavior here is going to vary considerably depending on both how the client itself is configured and the details of the server it's connecting to. On the client side, the basic timeout controlled by the value of "max_resp_timeout" in the "nsmb.conf" configuration (see "man nsmb.conf" for more details). I believe the default value is currently 35s or 45s (depending on the specifics of the server it's connecting to) and it cannot be set to more than 600s/10m (larger values modified to 600s).
On the server side, features like durable handle support will increase that time; however, what that timeout will actually be is negotiated with the server, so I can't tell you what that value would be.
Related to the server side:
whereas in Windows and Linux, the maximum timeout was 60 sec and 90 sec.
I don't know this for certain, but I suspect that opening a file as a durable handle requires writing specific code on Windows/Linux, while it's automatic on macOS. In addition, the exact negotiation logic is going to be different across the three platforms. Either or both of those could cause very different behavior when connecting to the "same" server.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware