The Samba-Bugzilla – Bug 10488
socket options not working as described
Last modified: 2014-03-07 17:59:41 UTC
socket options = TCP_NODELAY
will not work.
socket options = SO_KEEPALIVE=0 TCP_NODELAY=1
i realized it, because i was not able to disable SO_KEEPALIVE.
i need SO_KEEPALIVE=0 because, when windows client is in standby mode, then Socket is closed after (7875 seconds).
TCP_KEEPIDLE=7200 TCP_KEEPCNT=9 TCP_KEEPINTVL=75 --> 7875 sec.
the problem is, when socket is closed and samba disconnects the client(which is in S3), then windows connection to the samba share takes much time after wakeup.
normal wakeup and samba connection takes about 5 sec.
wenn socket is closed it takes about 12 seconds.
it would be great if there would be an option to tell samba to keep connection open, for all clients which are in standby or hybernate.
maybe windows informs the server befor standby.
otherwise SO_KEEPALIVE will be a problem when windows has exclusive open files.
if you dont want to wait 2 hours then set:
socket options = SO_KEEPALIVE=1 TCP_KEEPIDLE=60 TCP_KEEPCNT=2 TCP_KEEPINTVL=10
-> samba should disconnect the client after 80sec, when not reachable.