hdparm readahead max is only 2048 - could be higher
Brought to you by:
ideguy
My hard drive reports a readahead of 6144. Your program only set up to 2048. I modified the hdparm.c to allow 0 - 32768 in the input check line, and compiled. Now I am able to set to a higher value.
hdparm -a /dev/sda
/dev/sda:
readahead = 2048 (on)
hdparm -a32768 /dev/sda
/dev/sda:
setting fs readahead to 32768
readahead = 32768 (on)
The -a parameter is for filesystem read-ahead, not the drive's own readahead (see man page, yes this is documented). The Linux kernel automatically tunes block device read-ahead on its own as well, so there is little (if any) real benefit to fiddling with this value.