NFS Performance Tuning for HP-UX 11.0 and 11i Systems

nfs performance tuning for hp-ux 11.0 and 11i systems page 44
Notes:
Page 44July 22, 2002
Copyright 2002 Hewlett- Packard Company
nfsd
How do they work in the WRITE case?
1. Determine if the client is writing in synchronous or asynchronous
mode
2. Synchronous schedule the WRITE to the underlying filesystem, sleep
until the call completes, then wake up and send a reply to the client
3. Asynchronous post the data to cache and respond immediately
PV2 Get the data posted to physical disk before the server crashes
PV3 Get the data posted to physical disk before the client sends a
COMMIT, requiring the data to be flushed to stable storage.
GOAL: Post the data to the server’s buffer cache as quickly as
possible and allow the client to continue. Flush the data to
physical disk in the background as quickly as possible.
The nfsds (or kernel threads) behave differently depending up on whether the NFS
client is sending its write requests asking for synchronous or asynchronous
semantics.
In synchronous mode (the default behavior for NFS PV2), the nfsds take the write
data from the request and schedule a disk I/O operation to get the data posted to
stable storage as quickly as possible. The nfsd blocks waiting for the I/O to
complete before responding to the client and allowing it to continue.
In asynchronous mode (the default behavior for PV3, and can be enabled on PV2
by exporting the filesystem with the “async” option), the nfsd takes the data from
the request, posts it to the server’s buffer cache, and sends a reply immediately
allowing the client process to continue before the data is actually posted to stable
storage. In the PV2 case, the NFS server’s goal is to get the data posted to
physical disk before the server experiences a system crash. In the PV3 case, the
NFS server tries to flush the data to stable storage before the client sends a
COMMIT request, since nfsd is not allowed to reply to a COMMIT request until all
data specified in the request is posted to physical disk.