aboutsummaryrefslogtreecommitdiff
path: root/zenserver/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/config.cpp')
-rw-r--r--zenserver/config.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp
index 9531a5251..057b26c5b 100644
--- a/zenserver/config.cpp
+++ b/zenserver/config.cpp
@@ -493,6 +493,14 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions)
"Garbage collection monitoring interval in seconds.",
cxxopts::value<int32_t>(ServerOptions.GcConfig.MonitorIntervalSeconds)->default_value("30"),
"");
+
+ options.add_option("gc",
+ "",
+ "gc-disksize-softlimit",
+ "Garbage collection disk usage soft limit. Default set to 0 (Off).",
+ cxxopts::value<uint64_t>(ServerOptions.GcConfig.Cache.DiskSizeSoftLimit)->default_value("0"),
+ "");
+
try
{
auto result = options.parse(argc, argv);
@@ -825,6 +833,7 @@ ParseConfigFile(const std::filesystem::path& Path, ZenServerOptions& ServerOptio
ServerOptions.GcConfig.Cache.MaxDurationSeconds = CacheGcConfig.value().get_or("maxdurationseconds", int32_t(0));
ServerOptions.GcConfig.Cache.DiskSizeLimit = CacheGcConfig.value().get_or("disksizelimit", ~uint64_t(0));
ServerOptions.GcConfig.Cache.MemorySizeLimit = CacheGcConfig.value().get_or("memorysizelimit", ~uint64_t(0));
+ ServerOptions.GcConfig.Cache.DiskSizeSoftLimit = CacheGcConfig.value().get_or("disksizesoftlimit", 0);
}
if (sol::optional<sol::table> CasGcConfig = GcConfig.value()["cas"])