I've done some experimenting with readahead... The normal setting is 256 sectors. Using 2048 sectors (~1 MB I think) appears to improve the load time of some applications, e.g. LibreOffice (which makes sense because it uses some huge libraries). Using 65536 sectors, or similarly absurd settings via 'blockdev --setra', kills throughput in hdparm benchmarks (so I know settings above 2048 are valid); but does not appear to have much negative impact on desktop performance. As far as I can tell, no readahead setting (other than zero) causes excessive disk activity.
Where does filesystem readahead stop reading - when it reaches EOF, or later? Is there any disadvantage to setting it to 2048 on a modern computer with > 1 GB of RAM? What about on older machines with slow hard drives?
Last edited by Gullible Jones (2012-06-28 02:34:18)