aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-12-13 10:29:21 -0500
committerGitHub <[email protected]>2023-12-13 16:29:21 +0100
commit00b8423fb2616bb9048e7ba7298e97ed44ff1ccb (patch)
tree62925152ba1ceab2d40e33378f1fd014da1d9376
parentskip invalid chunks when reclaiming space in block store (#607) (diff)
downloadzen-00b8423fb2616bb9048e7ba7298e97ed44ff1ccb.tar.xz
zen-00b8423fb2616bb9048e7ba7298e97ed44ff1ccb.zip
fix peak disk load in gc status (#608)
* MaxLoad is max load per monitor slot, not the MaxLoad for the entire graph
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/zenstore/gc.cpp23
2 files changed, 12 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index df7ee80c1..a9ab9e67b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
##
- Bugfix: ShutdownLogging code would throw an exception if it was called before everything had been initialised properly
- Bugfix: Reorder shutdown to avoid crash due to late async log messages (spdlog workaround)
+- Bugfix: Correctly calculate peak disk write size in GC status message
- Bugfix: Skip invalid chunks in block store GC when moving existing chunks
- Improvement: Adjuted and added some trace scopes
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp
index de653b0e3..4cc2c3ed1 100644
--- a/src/zenstore/gc.cpp
+++ b/src/zenstore/gc.cpp
@@ -1876,18 +1876,17 @@ GcScheduler::SchedulerThread()
NextTriggerStatus = Sb;
}
- ZEN_INFO(
- "{} used{}. '{}': {} in use, {} free. Disk writes last {} per {} [{}], peak {}/s.{}",
- NiceBytes(TotalSize.DiskSize),
- DiskSizeSoftLimit == 0 ? "" : fmt::format(", {} soft limit", NiceBytes(DiskSizeSoftLimit)),
- m_Config.RootDirectory,
- NiceBytes(Space.Total - Space.Free),
- NiceBytes(Space.Free),
- NiceTimeSpanMs(uint64_t(std::chrono::milliseconds(LoadGraphTime).count())),
- NiceTimeSpanMs(uint64_t(std::chrono::milliseconds(LoadGraphTime).count() / PressureGraphLength)),
- LoadGraph,
- NiceBytes(MaxLoad * uint64_t(std::chrono::seconds(1).count()) / uint64_t(std::chrono::seconds(LoadGraphTime).count())),
- NextTriggerStatus);
+ ZEN_INFO("{} used{}. '{}': {} in use, {} free. Disk writes last {} per {} [{}], peak {}/s.{}",
+ NiceBytes(TotalSize.DiskSize),
+ DiskSizeSoftLimit == 0 ? "" : fmt::format(", {} soft limit", NiceBytes(DiskSizeSoftLimit)),
+ m_Config.RootDirectory,
+ NiceBytes(Space.Total - Space.Free),
+ NiceBytes(Space.Free),
+ NiceTimeSpanMs(uint64_t(std::chrono::milliseconds(LoadGraphTime).count())),
+ NiceTimeSpanMs(uint64_t(std::chrono::milliseconds(LoadGraphTime).count() / PressureGraphLength)),
+ LoadGraph,
+ NiceBytes(MaxLoad / uint64_t(std::chrono::seconds(m_Config.MonitorInterval).count())),
+ NextTriggerStatus);
if (!DiskSpaceGCTriggered && !TimeBasedGCTriggered)
{