diff options
| author | Dan Engelbrecht <[email protected]> | 2023-11-21 16:58:43 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-21 16:58:43 +0100 |
| commit | 669a8869b5414c0e8708dd90b1f4aa297d091887 (patch) | |
| tree | c81c309cf3013e3129caeefb5c3eaba2aaed6967 /src/zenstore/include | |
| parent | fixed paths in ue_build_linux/README.md (diff) | |
| download | zen-669a8869b5414c0e8708dd90b1f4aa297d091887.tar.xz zen-669a8869b5414c0e8708dd90b1f4aa297d091887.zip | |
add command line options for compact block threshold and gc verbose (#557)
- Feature: Added new options to zenserver for GC V2
- `--gc-compactblock-threshold` GCV2 - how much of a compact block should be used to skip compacting the block, default is 90%
- `--gc-verbose` GCV2 - enable more verbose output when running a GC pass
- Feature: Added new options to `zen gc` command for GC V2
- `--compactblockthreshold` GCV2 - how much of a compact block should be used to skip compacting the block, default is 90%
- `--verbose` GCV2 - enable more verbose output when running a GC pass
- Feature: Added new parameters for endpoint `admin/gc` (PUT)
- `compactblockthreshold` GCV2 - how much of a compact block should be used to skip compacting the block, default is 90%
- `verbose` GCV2 - enable more verbose output when running a GC pass
Diffstat (limited to 'src/zenstore/include')
| -rw-r--r-- | src/zenstore/include/zenstore/gc.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/zenstore/include/zenstore/gc.h b/src/zenstore/include/zenstore/gc.h index 4cd01bc2c..f50af8006 100644 --- a/src/zenstore/include/zenstore/gc.h +++ b/src/zenstore/include/zenstore/gc.h @@ -397,7 +397,9 @@ struct GcSchedulerConfig uint64_t DiskSizeSoftLimit = 0; uint64_t MinimumFreeDiskSpaceToAllowWrites = 1ul << 28; std::chrono::seconds LightweightInterval{}; - GcVersion UseGCVersion = GcVersion::kV1; + GcVersion UseGCVersion = GcVersion::kV1; + uint32_t CompactBlockUsageThresholdPercent = 90; + bool Verbose = false; }; struct GcSchedulerState @@ -469,6 +471,8 @@ public: bool SkipCid = false; bool SkipDelete = false; std::optional<GcVersion> ForceGCVersion; + std::optional<uint32_t> CompactBlockUsageThresholdPercent; + std::optional<bool> Verbose; }; bool TriggerGc(const TriggerGcParams& Params); @@ -488,7 +492,9 @@ private: bool Delete, bool CollectSmallObjects, bool SkipCid, - GcVersion UseGCVersion); + GcVersion UseGCVersion, + uint32_t CompactBlockUsageThresholdPercent, + bool Verbose); void ScrubStorage(bool DoDelete, std::chrono::seconds TimeSlice); LoggerRef Log() { return m_Log; } virtual bool AreDiskWritesAllowed() const override { return !m_AreDiskWritesBlocked.load(); } |