Block devices are important to host performance. Correct configuration of the block device queue depth, scheduling algorithm, prefetch amount, and I/O alignment improves system performance.
Queue Depth
The queue depth determines the maximum number of concurrent I/Os written to the block device. In Linux, the default value is 128. Do not change the value unless absolutely necessary. To query the queue depth of the block device, run cat.
linux-ob3a:~ # cat /sys/block/sdc/queue/nr_requests
128
In the event of testing the highest system performance, you can set the queue depth to a larger value to increase the I/O write pressure and the probability of combining I/Os in the queue. To temporarily change the queue depth of a block device, use the following method:
echo 256 > /sys/block/sdc/queue/nr_requests
NOTE
You can tune the performance by temporarily changing the queue depth of a block device. After the application server is restarted, the queue depth is restored to the default value.