NSS offers the Read Ahead Blocks command for tuning read performance, and the Allocate Ahead Blocks command for tuning write performance. You can enter the commands in the NSS Console.
The Read Ahead Blocks parameter can be set differently on each NSS volume. It specifies the number of data blocks that NSS reads ahead for any open file on which read operations are ongoing in the specified server. The Read Ahead Blocks parameter is enabled by default and set at 16 blocks. To modify the value, you must set it from the command line using the ReadAheadBlks switch. You can also set the value from NSSMU in the volume properties.
The valid range for block count is 0 blocks to 1024 blocks, where a block count of zero (0) implies no read ahead.
The most efficient value for block count depends on your hardware. In general, we recommend a block count of 8 to 16 blocks for large data reads; 2 blocks for CDs, 8 blocks for DVDs, and 2 blocks for ZLSS.
Aggressive read ahead is optimal only for sequential access. As the number of concurrent connections to unique files increases, you should reduce the read-ahead block count.
Specify VolName as the name of the volume that you are setting the attribute for. Specify the Count to be the number of 4 KB blocks that you want to NSS to read ahead. The valid range for a block count is 0 blocks to 1024 blocks, where a block count of zero (0) implies no read ahead. However, 128 blocks is the practical maximum.
Read-ahead block counts higher than 128 can starve other system components for memory or buffers, which can impair performance or cause the system to hang. As the number of concurrent connections to unique files increase, you should reduce the number of read-ahead blocks.
Range: 0 to 1024 blocks, where 0=Off; Practical maximum: 128
When applications write data to the file system, NSS allocates the blocks at the logical write time and the new data is cached in memory. At a later time, all cached blocks are grouped and are written to the disk in an optimal order based on the flush policy. AllocAheadBlocks helps applications and protocol servers that do small writes for moderate or large files so they have fewer transactions and the blocks on the disk are less fragmented. Having less fragmentation on disk substantially helps all further physical reads from the disk, because the disks do not need to use as much time in seeking.
Logical Write Time: When the application writes to NSS.
Physical Write Time: When NSS writes to the disk.
If the application is doing small writes NSS allocates blocks in small increments. Depending on the other parallel activities going on in the system, the blocks on disk could become fragmented, in spite of the attempts made by NSS to allocate these blocks in the same area.
Use the Allocate Ahead Blocks parameter for tuning write performance for all NSS volumes on the server.
Sets the number of blocks to allocate ahead on writes.
Range: 0 to 63
For example, if most of the files that are created and extended are 64 KiB, AllocAheadBlocks should be set to 16 KiB (64 KiB / 4 KiB = 16) (a data block is 4 KiB bytes).
The default is set to zero because higher settings can slow down small file creation. For example, if AllocAheadBlks is set to 16, NSS allocates 16 data blocks. For a small file this is the only logical write. When the file is closed, NSS is forced to truncate the file to the correct size which slows down small file creation.