2
  1. NFS server somehow disconnect
  2. NFS client detect server is disconnected
  3. client tries to reconnect
  4. server reappears and reconnect successfully

it seems that TCP keepalive, connection timeout is doing something but the default keepalive time, which I found in /proc/sys/net/ipv4/ is 7200

so i thought tcp keepalive time is overridden by NFS

current problem is that when NFS client takes few minutes to detect server and showing message below, we'd like to shorten this time(No3 from above).

"nfs: server not responding, still trying"

we measured the polling time,

  1. 24sec
  2. 72sec (24sec+(24sec*2=48sec))
  3. 16sec (72sec+(48sec*2=96sec))
  4. 360sec (168sec+(96sec*2=192sec))
  5. 660sec (+300sec)
  6. 960sec (+300sec)

24 -> 48 -> 96 -> 192 -> 300 -> 300

does anyone know where you can find this '300'? or is this because of some other issue rather than TCP keepalive time?

6
  • * we already touched kernel parameters from /proc/sys/net/ipv4/tcp_retries2
    – aji
    Oct 19, 2015 at 4:37
  • Doesn't the NFS protocol itself detect the absence of the server, instead of relying on the underlying TCP keepalive?
    – wurtel
    Oct 19, 2015 at 9:21
  • NFS over TCP is what we are using. so the protocol is TCP
    – aji
    Oct 20, 2015 at 7:52
  • No, NFS is also a protocol, which can use TCP or UDP as transport layer. TCP is an OSI level 4 protocol, NFS is a higher level protocol (one could argue that it's level 5 but there are different opinions about this). TCP in turn uses IP as its underlying protocol. So saying "the protocol is TCP" is al bit short-sighted. So it's possible that NFS is doing some sort of keepalive handshake (i.e. sending TCP data packets to and fro with specific content) which has nothing to do with TCP keepalive.
    – wurtel
    Oct 20, 2015 at 11:15
  • so is there something that configures TCP keepalive on NFS? sorry for the basical question. thanks
    – aji
    Oct 22, 2015 at 8:24

1 Answer 1

3

Yes, NFS client does override keepalive settings -- it derives them from 'timeo' mount option. see http://lxr.free-electrons.com/source/net/sunrpc/xprtsock.c for low-level detail.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .