Skip to content

Commit eb19c79

Browse files
committed
Increase default disk cache to 16 MiB
1 parent 02d170c commit eb19c79

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

HISTORY

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ SnapRAID HISTORY
44
12.1 2022/01
55
============
66
* Reduce stack usage to work in enviromnents with limited stack size, like MUSL.
7+
* Increase the default disk cache from 8 MiB to 16 MiB.
78

89
12.0 2021/12
910
============

cmdline/io.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -879,9 +879,9 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
879879

880880
#if HAVE_THREAD
881881
if (io_cache == 0) {
882-
/* default is 8 MiB of cache */
882+
/* default is 16 MiB of cache */
883883
/* this seems to be a good tradeoff between speed and memory usage */
884-
io->io_max = 8 * 1024 * 1024 / state->block_size;
884+
io->io_max = 16 * 1024 * 1024 / state->block_size;
885885
if (io->io_max < IO_MIN)
886886
io->io_max = IO_MIN;
887887
if (io->io_max > IO_MAX)

cmdline/io.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
* 4 - 452 MB/s, CPU 54%, speed 118%
3636
* 8 - 487 MB/s, CPU 60%, speed 128%
3737
* 16 - 505 MB/s, CPU 63%, speed 132%
38-
* 32 - 520 MB/s, CPU 64%, speed 136%
39-
* 64 - 524 MB/s, CPU 65%, speed 137%
38+
* 32 - 520 MB/s, CPU 64%, speed 136% [SnapRAID <= 12.0]
39+
* 64 - 524 MB/s, CPU 65%, speed 137% [SnapRAID > 12.0]
4040
* 128 - 525 MB/s, CPU 66%, speed 138%
4141
*/
4242
#define IO_MIN 3 /* required by writers, readers can work also with 2 */

0 commit comments

Comments
 (0)