Bug 10488 - socket options not working as described
Summary: socket options not working as described
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 4.1.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba Documentation QA Contact~
QA Contact: Samba Documentation QA Contact~
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-07 17:59 UTC by onur sentürk
Modified: 2017-03-11 18:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description onur sentürk 2014-03-07 17:59:41 UTC
socket options = TCP_NODELAY
will not work.

socket options = SO_KEEPALIVE=0 TCP_NODELAY=1
this works.


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.

regards, onur
Comment 1 Björn Jacke 2017-03-11 18:30:48 UTC
the socket options only applies changes to your system's default socket options. On current Linux kernels this is indeed keepalive intvl = 75, probes = 9 and time = 7200. From the Samba point of view socket options is working as designed. But apart from that your settings are usefull to disconnect "dead" clients.