/usr/src/sys/kern/vfs_bio.c
8
lorunningspace = 512 * 1024;
hirunningspace = 1024 * 1024;
9
最大16MB
hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBSIZE),
16 * 1024 * 1024), 1024 * 1024);
lorunningspace = roundup((hirunningspace * 2) / 3, MAXBSIZE);
例
8.3 | 9.1 | |
vfs.hirunningspace | 1048576 (1MB) | 16777216 (16MB) |
vfs.lorunningspace | 524288 | 11206656 |
vfs.read_max | 8 | 64 (2048 KiB) |
vfs.hirunningspace
You can bump up the related sysctl for hirunningspace if it helps
you, no kernel code modification is needed. I recommend setting it
to at least 8MB (8388608).sysctl vfs.hirunningspace=8388608
sysctl vfs.lorunningspace=1048576
vfs.hirunningspace sysctl は、任意の時点においてシステム全体で、 ディスクコントローラのキューに入れて未完了状態にして良い、 書き込み I/O の量を決定します。 通常、デフォルト値で十分ですが、 ディスクをたくさん持つマシンでは 4、5メガバイトに増やしたくなるかもしれません。 値を大きくしすぎる (バッファキャッシュの 書き込みの閾値を超えて) と、クラスタリングの効果が極端に悪くなる 可能性があるので注意してください。 この値を思いつきで大きくしては いけません! また書き込みのキュー値を大きくすると、同時に発生した 読みだしが待たされるかもしれません。
vfs.read_max
The vfs.read_max sysctl governs VFS read-ahead and is expressed as the number of blocks to pre-read if the heuristics algorithm decides that the reads are issued sequentially. It is used by the UFS, ext2fs and msdosfs file systems. With the default UFS block size of 32KiB, a setting of 64 (the default value in 9.x) will allow speculatively reading up to 2048 KiB. This setting may be increased to get around disk I/O latencies, especially where these latencies are large such as in virtual machine emulated environments. It may be tuned down in specific cases where the I/O load is such that read-ahead adversely affects performance or where system memory is really low.
SystemTuning - FreeBSD Wiki