diff options
| author | Per Larsson <[email protected]> | 2021-12-05 16:03:27 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-12-05 16:03:27 +0100 |
| commit | 9eb0876ab1f35317eb04dd8a74f0394e853f4f56 (patch) | |
| tree | 1dfd11024baea97b01c69b40153086511987f361 /zenserver/config.h | |
| parent | Merge branch 'gc' of https://github.com/EpicGames/zen into gc (diff) | |
| download | zen-9eb0876ab1f35317eb04dd8a74f0394e853f4f56.tar.xz zen-9eb0876ab1f35317eb04dd8a74f0394e853f4f56.zip | |
Added simple GC interval scheduling.
Diffstat (limited to 'zenserver/config.h')
| -rw-r--r-- | zenserver/config.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/zenserver/config.h b/zenserver/config.h index 19fba71a3..97f339a0e 100644 --- a/zenserver/config.h +++ b/zenserver/config.h @@ -55,9 +55,34 @@ struct ZenUpstreamCacheConfig bool StatsEnabled = false; }; +struct ZenCacheEvictionPolicy +{ + bool Enabled = true; + uint64_t DiskSizeLimit = ~uint64_t(0); + uint64_t MemorySizeLimit = 1024 * 1024 * 1024; +}; + +struct ZenCasEvictionPolicy +{ + bool Enabled = true; + bool ContainerGcEnabled = true; + uint64_t LargeStrategySizeLimit = ~uint64_t(0); + uint64_t SmallStrategySizeLimit = ~uint64_t(0); + uint64_t TinyStrategySizeLimit = ~uint64_t(0); +}; + +struct ZenGcConfig +{ + ZenCasEvictionPolicy Cas; + ZenCacheEvictionPolicy Cache; + int32_t IntervalSeconds = 60 * 60; + bool Enabled = true; +}; + struct ZenServerOptions { ZenUpstreamCacheConfig UpstreamCacheConfig; + ZenGcConfig GcConfig; std::filesystem::path DataDir; // Root directory for state (used for testing) std::filesystem::path ContentDir; // Root directory for serving frontend content (experimental) std::filesystem::path AbsLogFile; // Absolute path to main log file |