Start M8.1 inventory: stated facts, workload profile and collectors

Record the maintainer-stated host facts (R730xd ~128 GB, 32 GB workers,
automatic Harbor publish and Argo CD deploy, existing aevolution-db
Secret and its conflicts with the pinned version and role split), the
measured evo-server profile (peak RSS ~9.7 MiB, ~0.3% of a core) and a
local storage baseline. Add a read-only cluster collector that never
fetches Secret data and a by-hand storage latency probe outside the
Argo path. Cluster facts remain uninspected pending read-only access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-29 11:57:08 -04:00
co-authored by Claude Opus 5.5
parent 168c90d5b2
commit 680e7e5725
8 changed files with 376 additions and 2 deletions
+43 -1
View File
@@ -5,7 +5,10 @@
#include "evo/persistence/sha256.hpp"
#include "fixtures/server_process.hpp"
#include <algorithm>
#include <fstream>
#include <iterator>
#include <source_location>
#include <sstream>
#include <thread>
void run_region_migration_tests();
@@ -256,6 +259,28 @@ void upgrade_across_migration_and_barrier() {
CHECK(load_region_checkpoint(*owner_db, r.key, 5s)->head == final_head->head);
}
// Resource profile of a live process from /proc (M8.1 budgets): peak resident
// set (VmHWM, KiB) and consumed CPU time (user + system, ms).
struct ProcessProfile {
std::uint64_t peak_rss_kib{}, cpu_ms{};
};
ProcessProfile profile_of(pid_t pid) {
ProcessProfile out;
std::ifstream status("/proc/" + std::to_string(pid) + "/status");
for (std::string line; std::getline(status, line);)
if (line.starts_with("VmHWM:"))
out.peak_rss_kib = std::stoull(line.substr(6));
std::ifstream stat("/proc/" + std::to_string(pid) + "/stat");
std::string text((std::istreambuf_iterator<char>(stat)), {});
// Fields after the parenthesized command: state is field 3; utime/stime 14/15.
std::istringstream fields(text.substr(text.rfind(')') + 2));
std::vector<std::string> f{std::istream_iterator<std::string>(fields), {}};
CHECK(f.size() > 13 && out.peak_rss_kib > 0);
const auto ticks = std::stoull(f[11]) + std::stoull(f[12]);
out.cpu_ms = ticks * 1000 / static_cast<std::uint64_t>(::sysconf(_SC_CLK_TCK));
return out;
}
std::uint64_t percentile(std::vector<std::uint64_t> v, unsigned p) {
CHECK(!v.empty());
std::ranges::sort(v);
@@ -302,7 +327,8 @@ void durability_qualification() {
const auto args =
with(with(server_args(r), "--lease-profile", "default"), "--flush-ms", "1000");
std::vector<std::uint64_t> latency, kill_to_ready;
std::uint64_t death_latency = 0;
std::uint64_t death_latency = 0, peak_rss_kib = 0;
std::vector<std::uint64_t> cpu_ms, busy_ms; // Per owner: CPU used, wall time serving.
std::uint64_t next = 1;
std::uint64_t epoch = 1;
for (int round = 0; round < 3; ++round) {
@@ -326,6 +352,10 @@ void durability_qualification() {
server.send(input_lines(last + 1, last + 10, true));
server.pump(200ms);
const auto acked = max_acked(server);
const auto used = profile_of(server.pid());
peak_rss_kib = std::max(peak_rss_kib, used.peak_rss_kib);
cpu_ms.push_back(used.cpu_ms);
busy_ms.push_back(ms_between(sent.front(), Clock::now()));
server.signal(SIGKILL);
const auto killed = Clock::now();
CHECK(server.wait_exit(20s) == 128 + SIGKILL);
@@ -358,6 +388,18 @@ void durability_qualification() {
kill_to_ready.size(), static_cast<unsigned long long>(kill_to_ready[0]),
static_cast<unsigned long long>(kill_to_ready[1]));
std::uint64_t cpu_total = 0, busy_total = 0;
for (std::size_t i = 0; i < cpu_ms.size(); ++i) {
cpu_total += cpu_ms[i];
busy_total += busy_ms[i];
}
std::printf(
"qualification server_profile owners=%zu peak_rss_kib=%llu cpu_ms=%llu "
"wall_ms=%llu cpu_permille=%llu\n",
cpu_ms.size(), static_cast<unsigned long long>(peak_rss_kib),
static_cast<unsigned long long>(cpu_total), static_cast<unsigned long long>(busy_total),
static_cast<unsigned long long>(busy_total == 0 ? 0 : cpu_total * 1000 / busy_total));
// Verification cost on the final head (no lease needed to read).
auto reader = connect_to(env("PGDATABASE"), env("EVO_PG_RUNTIME_USER"));
auto objects = store(r);