Re: Read/Write NFS I/O performance degraded by FLUSH_STABLE page flushing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dean Hildebrand (seattleplus@xxxxxxxxx) wrote on 3 June 2009 17:28:
 >Trond Myklebust wrote:
 >> On Wed, 2009-06-03 at 13:22 -0300, Carlos Carvalho wrote:
 >>   
 >>> Trond Myklebust (trond.myklebust@xxxxxxxxxx) wrote on 2 June 2009 13:27:
 >>>  >Write gathering relies on waiting an arbitrary length of time in order
 >>>  >to see if someone is going to send another write. The protocol offers no
 >>>  >guidance as to how long that wait should be, and so (at least on the
 >>>  >Linux server) we've coded in a hard wait of 10ms if and only if we see
 >>>  >that something else has the file open for writing.
 >>>  >One problem with the Linux implementation is that the "something else"
 >>>  >could be another nfs server thread that happens to be in nfsd_write(),
 >>>  >however it could also be another open NFSv4 stateid, or a NLM lock, or a
 >>>  >local process that has the file open for writing.
 >>>  >Another problem is that the nfs server keeps a record of the last file
 >>>  >that was accessed, and also waits if it sees you are writing again to
 >>>  >that same file. Of course it has no idea if this is truly a parallel
 >>>  >write, or if it just happens that you are writing again to the same file
 >>>  >using O_SYNC...
 >>>
 >>> I think the decision to write or wait doesn't belong to the nfs
 >>> server; it should just send the writes immediately. It's up to the
 >>> fs/block/device layers to do the gathering. I understand that the
 >>> client should try to do the gathering before sending the request to
 >>> the wire
 >>>     
 >Just to be clear, the linux NFS server does not gather the writes.  
 >Writes are passed immediately to the fs.

Ah! That's much better.

 >nfsd simply waits 10ms before 
 >sync'ing the writes to disk.  This allows the underlying file system 
  ****
 >time to do the gathering and sync data in larger chunks.

OK, all is perfectly fine then.

Since syncs seem to be a requirement of the protocol, perhaps the 10ms
delay could be made tunable to allow admins more flexibility. For
example, if we change other timeouts we could adjust the nfs sync one
accordingly. Could be an option to nfsd or, better, a variable in /proc.

Thanks Dean and Trond for the explanations.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux