mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Increase default disk cache to 16 MiB
This commit is contained in:
parent
02d170c004
commit
eb19c79039
3 changed files with 5 additions and 4 deletions
1
HISTORY
1
HISTORY
|
|
@ -4,6 +4,7 @@ SnapRAID HISTORY
|
|||
12.1 2022/01
|
||||
============
|
||||
* Reduce stack usage to work in enviromnents with limited stack size, like MUSL.
|
||||
* Increase the default disk cache from 8 MiB to 16 MiB.
|
||||
|
||||
12.0 2021/12
|
||||
============
|
||||
|
|
|
|||
|
|
@ -879,9 +879,9 @@ void io_init(struct snapraid_io* io, struct snapraid_state* state,
|
|||
|
||||
#if HAVE_THREAD
|
||||
if (io_cache == 0) {
|
||||
/* default is 8 MiB of cache */
|
||||
/* default is 16 MiB of cache */
|
||||
/* this seems to be a good tradeoff between speed and memory usage */
|
||||
io->io_max = 8 * 1024 * 1024 / state->block_size;
|
||||
io->io_max = 16 * 1024 * 1024 / state->block_size;
|
||||
if (io->io_max < IO_MIN)
|
||||
io->io_max = IO_MIN;
|
||||
if (io->io_max > IO_MAX)
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@
|
|||
* 4 - 452 MB/s, CPU 54%, speed 118%
|
||||
* 8 - 487 MB/s, CPU 60%, speed 128%
|
||||
* 16 - 505 MB/s, CPU 63%, speed 132%
|
||||
* 32 - 520 MB/s, CPU 64%, speed 136%
|
||||
* 64 - 524 MB/s, CPU 65%, speed 137%
|
||||
* 32 - 520 MB/s, CPU 64%, speed 136% [SnapRAID <= 12.0]
|
||||
* 64 - 524 MB/s, CPU 65%, speed 137% [SnapRAID > 12.0]
|
||||
* 128 - 525 MB/s, CPU 66%, speed 138%
|
||||
*/
|
||||
#define IO_MIN 3 /* required by writers, readers can work also with 2 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue