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

来源:互联网 发布:类似everything的软件 编辑:程序博客网 时间:2024/05/18 16:13
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
0 0
原创粉丝点击