Performance issues are those issues which arise when applying IEEE 1003.1-1990 to a network environment, an environment for which the standard was not specifically designed. Unlike semantic issues, performance issues are IEEE 1003.1-1990 facilities that can be implemented in a network environment, but may result in performance degradation.
Caching is one of the most widely used techniques for improving the performance of data transfers between a system and an external device. The technique may be applied to many different situations. Applying this technique to system and application software means that data transfers initiated by programs may take place between a program's local memory and a cache memory instead of directly to the external device. Small data transfers initiated by a program are combined into large blocks in the cache memory. Data transfer of the large blocks between the cache memory and the external device is managed by the system. The use of caching permits data transfers to or from the external device to take place in larger blocks in order to better overlap CPU operation and external device access, thus improving system throughput. In addition, since data is temporarily stored in large blocks in cache memory, the number of accesses to the external device is reduced. The data may already be available in the cache for reading and each write of a small block of data goes to the cache. Caching data transfers between system and application software may be useful any time access is required to an external device whose speed of access differs significantly from that of memory. For example, caching is typically used to improve the performance of disk access and network access by both clients and servers. When accessing remote files in a network environment, client caching is used to write and read data from cache on the client instead of directly writing to and reading from the network. Using client caching improves client system performance as well as decreases the number of network accesses.
Client caching plays such an important role in improving performance
and decreasing network access
that most clients use some caching mechanism when accessing remote files.
A demonstration was developed using NFS to show the effects on performance
by forgoing client caching.
The program read_file (see Appendix
)
reads a file one byte at a time and displays the byte. For this demonstration,
testfile is the remote file being read. The effects of using client
caching and turning off client caching are summarized below.
The program read_file is run from a client which is using client caching. Data from the server is read into the client's cache. The program read_file reads testfile one byte at a time from cache. When all the data in cache has been read, cache is refilled with data from the server. The network is accessed only when the client cache needs to be filled. The file testfile is displayed at a speed that is approximately the same as if testfile were local.
The program read_file is run from a client which has client caching turned off for the remote file testfile. For this demonstration, client caching is turned off by running setlock testfile as a separate process on the same client. The program setlock applies an advisory lock to all bytes of testfile. This turns off caching for testfile. The lock on testfile is initiated before read_file begins and is maintained until read_file completes. Because client caching is turned off, each byte of data is read directly from the server. This means that the client must access the network each time a byte of data is read. The file testfile is displayed at a speed much slower than if testfile were local. If testfile is a large file, the decline in performance is even more pronounced than if testfile were small.
This demonstration shows that the level of performance resulting from not using client caching is often unacceptable. Not only may a severe performance degradation result, but the network is bombarded with packets of data being sent, one byte at a time, between the client and the server.
This section deals with IEEE 1003.1-1990 facilities that can be implemented in a network environment, but can incur a performance penalty. Section 3.1 contains demonstrations which illustrate read/write consistency behavior for different client/server configurations. The effects of using Unix IO, stdio, and client caching, are summarized. Section 3.2 discusses the problems associated with the times returned by stat(). This issue is a semantic issues as well as a performance issue. The reporting of write() error conditions is discussed in section 3.3. Section 3.4 discusses record locking.