23.10 Read Ahead Blocks Commands

The Read Ahead Blocks parameter 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 2 blocks. To modify the value, you must set it from the command line using the ReadAheadBlocks option.

The default block count of 2 blocks (8 kilobytes) satisfies the performance requirements for a typical volume. The valid range for block count is 0 blocks to 1024 blocks, where a block count of zero (0) implies no read ahead. However, the practical maximum is 128 blocks.

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.

The block count should not exceed 128 blocks for most implementations. Aggressive read ahead is optimal for sequential access but it degrades random access. Block counts greater than 128 can starve other system components for memory or buffers, which can result in poor performance or can cause system hangs. As the number of concurrent connections to unique files increases, you should reduce the read-ahead block count.

To modify this parameter: At the server console, enter

nss /ReadAheadBlks=VolName:Count

Replace VolName with the volume name, such as data. Replace Count with the number of blocks to read ahead. The valid range is 0 (no read ahead) to 1024 blocks. Your setting is persistent; the value you set for a volume persists after reboot

NSS offers the following Read Ahead Blocks commands for tuning your storage solution.

Commands

Description

nss /AllocAheadBlks=value 

Sets the number of blocks to allocate ahead on writes.

[Default=15; Range=0 to 63]

nss /ReadAheadBlks=volname: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 default block count is 2 blocks, which satisfies the performance requirements for a typical volume. 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.

[Default=2; Maximum=1024; Practical maximum=128]