From 24d56c59756cc8dab3152b8b83fc454587da519a Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 5 May 2023 17:20:08 +0000 Subject: [PATCH] bump lmdb sync threshold for performance Force sync every 100k blocks instead of every 1k blocks. Bumping this value is reported to make a big difference in sync performance, eg: https://github.com/monero-project/monero/issues/8189 --- src/cryptonote_core/cryptonote_core.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 72ddd0dc9..c989939a2 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -576,7 +576,11 @@ namespace cryptonote else if(options[0] == "fastest") { db_flags = DBF_FASTEST; +#ifdef _WIN32 sync_threshold = 1000; // default to fastest:async:1000 +#else + sync_threshold = 100000; // default to fastest:async:100000 +#endif sync_mode = db_sync_mode_is_default ? db_defaultsync : db_async; } else