aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/config.h
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-05-12 10:22:17 +0200
committerGitHub Enterprise <[email protected]>2025-05-12 10:22:17 +0200
commit00dc4e3d0976e0f0cbd8a09a7693bad31b8db511 (patch)
tree25228db7c0f3029b4784d0e44d07d0a4cb7bae64 /src/zenserver/config.h
parenttweak iterate block parameters (#390) (diff)
downloadzen-00dc4e3d0976e0f0cbd8a09a7693bad31b8db511.tar.xz
zen-00dc4e3d0976e0f0cbd8a09a7693bad31b8db511.zip
enable per bucket config (#388)
Feature: Add per bucket cache configuration (Lua options file only) Improvement: --cache-memlayer-sizethreshold is now deprecated and has a new name: --cache-bucket-memlayer-sizethreshold to line up with per cache bucket configuration
Diffstat (limited to 'src/zenserver/config.h')
-rw-r--r--src/zenserver/config.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/zenserver/config.h b/src/zenserver/config.h
index bd277cd88..1d7d22ce9 100644
--- a/src/zenserver/config.h
+++ b/src/zenserver/config.h
@@ -119,15 +119,24 @@ struct ZenStatsConfig
int StatsdPort = 8125;
};
+struct ZenStructuredCacheBucketConfig
+{
+ uint64_t MaxBlockSize = 1ull << 30;
+ uint32_t PayloadAlignment = 1u << 4;
+ uint64_t MemCacheSizeThreshold = 1 * 1024;
+ uint64_t LargeObjectThreshold = 128 * 1024;
+};
+
struct ZenStructuredCacheConfig
{
- bool Enabled = true;
- bool WriteLogEnabled = false;
- bool AccessLogEnabled = false;
- uint64_t MemCacheSizeThreshold = 1 * 1024;
- uint64_t MemTargetFootprintBytes = 512 * 1024 * 1024;
- uint64_t MemTrimIntervalSeconds = 60;
- uint64_t MemMaxAgeSeconds = gsl::narrow<uint64_t>(std::chrono::seconds(std::chrono::days(1)).count());
+ bool Enabled = true;
+ bool WriteLogEnabled = false;
+ bool AccessLogEnabled = false;
+ std::vector<std::pair<std::string, ZenStructuredCacheBucketConfig>> PerBucketConfigs;
+ ZenStructuredCacheBucketConfig BucketConfig;
+ uint64_t MemTargetFootprintBytes = 512 * 1024 * 1024;
+ uint64_t MemTrimIntervalSeconds = 60;
+ uint64_t MemMaxAgeSeconds = gsl::narrow<uint64_t>(std::chrono::seconds(std::chrono::days(1)).count());
};
struct ZenProjectStoreConfig