From 97eb79c81b921ceac9e4eb9199403b8021f92939 Mon Sep 17 00:00:00 2001 From: "Lawrence, Rendall" Date: Mon, 24 Jun 2024 17:09:42 +0300 Subject: [PATCH] (minor) add max_readers option to example config --- bittorrent/peer.go | 1 + dist/example_config_lmdb.yaml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/bittorrent/peer.go b/bittorrent/peer.go index 5b55740..33935b7 100644 --- a/bittorrent/peer.go +++ b/bittorrent/peer.go @@ -11,6 +11,7 @@ import ( "net/netip" "github.com/rs/zerolog" + "github.com/sot-tech/mochi/pkg/str2bytes" ) diff --git a/dist/example_config_lmdb.yaml b/dist/example_config_lmdb.yaml index bc664bd..c5e983c 100644 --- a/dist/example_config_lmdb.yaml +++ b/dist/example_config_lmdb.yaml @@ -75,6 +75,10 @@ storage: # Maximum size of database, default is 1GiB max_size: 0 + # Maximum number of threads/reader slots for the LMDB environment, + # default is 126. + max_readers: 0 + # Set MDB_WRITEMAP and MDB_MAPASYNC flags to use asynchronous flushes to disk. # The installation of the flag can highly speed up writes, but there is a risk of DB damage # or loss of last committed data if the application crashes.