Menu

#80 hdparm readahead max is only 2048 - could be higher

v1.0 (example)
closed-rejected
nobody
None
5
2019-05-02
2019-03-01
No

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)

Discussion

  • Mark Lord

    Mark Lord - 2019-05-02

    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.

     
  • Mark Lord

    Mark Lord - 2019-05-02
    • status: open --> closed-rejected
     

Log in to post a comment.

MongoDB Logo MongoDB