调大预读缓冲区大小来提高性能

时间:2021-02-11 19:40:01
You can get the current settings of your harddrives with:
blockdev --report .
This will report all settings of all your currently attached harddrives.
The default value for the readahead buffer in linux 256, so by increasing this to 1024 we can get a better read performance in sequential reads from the disks.
To set this you need to do this for each disk (not partition) of your system. eg.:
blockdev --setra 1024 /dev/sda