The write process
The speed at which an application can perform write processes is measured by the time it takes to transfer the data to a secure medium, i.e. normally a hard disk.
NFS protocol version 2 used synchronous write mode. With this procedure, an application on a client writes a write process in its local NFS cache in the main memory and forwards it to the respective server. In this case, each write access of the application is converted to a write access on the NFS server. The server receives the write requests and executes them on its hard disk. It then notifies the client that it has executed the requests so that the client can remove the data from its cache and the application can conclude the write process positively. If the server does not announce the execution of requests within a certain time, the client simply re-sends the data from the cache.
NFS protocol version 3, on the other hand, uses asynchronous write mode (safe asynchronous write). As with NFS protocol version 2, write accesses are saved on the client in the cache and transmitted to the server. In this case, however, the server can send confirmation of receipt back to the client immediately without actually having to perform the write access. As far as the application on the client is concerned, this confirmation from the server indicates that the write process has been executed, and allows the application to continue working. For security reasons, the data initially remains in the NFS cache of the client. To improve efficiency, the server can collect several write processes from various clients in its cache and then write them together to the hard disk as one write process. The NFS system of the client later requests confirmation of the write process (commit). However, separate confirmation is not required for each write process. As soon as the data is on the hard disk, this request is answered positively by the server. The client or application can close a file and delete the corresponding NFS packets from the cache as soon as the respective confirmation has been received (close-to-open). If the server encounters a problem, the client can transfer the requests from its cache again. If the problem cannot be solved (e.g. if there is not enough memory available), an application error message can be output before the application terminates or before the file can be closed.
Read process
The read speed is defined as the length of time an application must wait before it is supplied with the desired data. In this case, the same procedures are used by NFS protocol version 2 and 3. Firstly, read data is buffered in the main memory of the respective client, and secondly a special read process is performed whereby more data is read into the cache than is actually needed (read ahead). This means that it may also be possible to perform the next read access of the application at the same time.