diff options
| author | Dan Engelbrecht <[email protected]> | 2022-12-02 16:56:51 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-02 07:56:51 -0800 |
| commit | 921078b38bfa91424c27ff707d950e26c18d3cd3 (patch) | |
| tree | e71446e3ebc29f7ff8ad47c0c23d8b2e49211dbe /zenserver/zenserver.cpp | |
| parent | reduce gc log spam (INFO -> DEBUG) (#199) (diff) | |
| download | zen-921078b38bfa91424c27ff707d950e26c18d3cd3.tar.xz zen-921078b38bfa91424c27ff707d950e26c18d3cd3.zip | |
Size based gc trigger (#197)
- Feature: Disk size triggered GC, a soft disk usage limit for cache data.
- Feature: New option `--gc-disk-size-soft-limit` (command line), `gc.cache.disksizesoftlimit` (lua config) controlling limit for soft disk usage limit. Defaults to zero which disables soft disk usage limit.
- Improvement: Disk write pressure in GC log and cleaned up clutter in GC logging.
Diffstat (limited to 'zenserver/zenserver.cpp')
| -rw-r--r-- | zenserver/zenserver.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index cabff7389..cf3d90324 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -357,15 +357,14 @@ public: } ZEN_INFO("initializing GC, enabled '{}', interval {}s", ServerOptions.GcConfig.Enabled, ServerOptions.GcConfig.IntervalSeconds); - zen::GcSchedulerConfig GcConfig{ - .RootDirectory = m_DataRoot / "gc", - .MonitorInterval = std::chrono::seconds(ServerOptions.GcConfig.MonitorIntervalSeconds), - .Interval = std::chrono::seconds(ServerOptions.GcConfig.IntervalSeconds), - .MaxCacheDuration = std::chrono::seconds(ServerOptions.GcConfig.Cache.MaxDurationSeconds), - .CollectSmallObjects = ServerOptions.GcConfig.CollectSmallObjects, - .Enabled = ServerOptions.GcConfig.Enabled, - .DiskReserveSize = ServerOptions.GcConfig.DiskReserveSize, - }; + zen::GcSchedulerConfig GcConfig{.RootDirectory = m_DataRoot / "gc", + .MonitorInterval = std::chrono::seconds(ServerOptions.GcConfig.MonitorIntervalSeconds), + .Interval = std::chrono::seconds(ServerOptions.GcConfig.IntervalSeconds), + .MaxCacheDuration = std::chrono::seconds(ServerOptions.GcConfig.Cache.MaxDurationSeconds), + .CollectSmallObjects = ServerOptions.GcConfig.CollectSmallObjects, + .Enabled = ServerOptions.GcConfig.Enabled, + .DiskReserveSize = ServerOptions.GcConfig.DiskReserveSize, + .DiskSizeSoftLimit = ServerOptions.GcConfig.Cache.DiskSizeSoftLimit}; m_GcScheduler.Initialize(GcConfig); return EffectiveBasePort; |