summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-08-08 10:29:46 +1000
committerjacqueline <me@jacqueline.id.au>2024-08-12 13:20:08 +1000
commitf8a3c16aad4e55bd19374c5029b4ac606b07dd7d (patch)
treeb364e3b0b584810c1b6db4d84e649be90dd07fa2 /src
parentd719f9c5017ad8006c21b6d546a5d70e846e9502 (diff)
downloadtangara-fw-f8a3c16aad4e55bd19374c5029b4ac606b07dd7d.tar.gz
Use one MMU page per leveldb write buffer
Also drop some of the other tuning changes, since they don't seem to impact much.
Diffstat (limited to 'src')
-rw-r--r--src/tangara/database/database.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tangara/database/database.cpp b/src/tangara/database/database.cpp
index 85700431..e3f3df67 100644
--- a/src/tangara/database/database.cpp
+++ b/src/tangara/database/database.cpp
@@ -144,10 +144,10 @@ auto Database::Open(IFileGatherer& gatherer,
leveldb::Options options;
options.env = sEnv.env();
- options.write_buffer_size = 4 * 1024;
- options.max_file_size = 16 * 1024;
+ // Match the write buffer size to the MMU page size in order to
+ // make most efficient use of PSRAM mapping.
+ options.write_buffer_size = CONFIG_MMU_PAGE_SIZE;
options.block_cache = cache.get();
- options.block_size = 2048;
auto status = leveldb::DB::Open(options, kDbPath, &db);
if (!status.ok()) {