aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2023-05-05 17:20:08 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2023-05-05 18:07:44 +0000
commit24d56c59756cc8dab3152b8b83fc454587da519a (patch)
tree0b09a9304ab2610ea87054f6cfac9284229c57e1 /src/cryptonote_core/cryptonote_core.cpp
parentMerge pull request #8760 (diff)
downloadmonero-24d56c59756cc8dab3152b8b83fc454587da519a.tar.xz
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
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp4
1 files changed, 4 insertions, 0 deletions
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