From 0a76f7351388e797ff0cb651adc1b0a6508eb56f Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Fri, 2 Feb 2024 19:32:06 +0100 Subject: [PATCH] Reduce default size of LMDB to 5368709120 (5GB) --- README.md | 2 +- gcache.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf6918e..5f42206 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,7 @@ The following configuration variables can be used to tweak settings. Defaults ar | `OTR_IDENTITY` | Y | | MQTT identity for PSK | `OTR_PSK` | Y | | MQTT PSK | `OTR_SERVERLABEL` | Y | `OwnTracks` | server label for Web -| `OTR_LMDBSIZE` | Y | `104857600000` | size of the LMDB database. If less than 10485760 (10 MB) it will be set to 10485760. +| `OTR_LMDBSIZE` | Y | `5368709120` | size of the LMDB database (5GB). If less than 10485760 (10 MB) it will be set to 10485760. ## Reverse proxy diff --git a/gcache.h b/gcache.h index 5167cab..3809071 100644 --- a/gcache.h +++ b/gcache.h @@ -4,7 +4,7 @@ #include "json.h" #include "lmdb.h" -#define LMDB_DB_SIZE ((size_t)100000 * (size_t)(1024 * 1024)) +#define LMDB_DB_SIZE ((size_t)5 * (size_t)(1024 * 1024 * 1024)) struct gcache { MDB_env *env;