1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# operator update 2026-06-12 — tier-1 12h A/B (verified), canary day 1, and three findings
the update you asked for when the 12h verification landed. prod is v0.0.4
(33162d4), genesis seq space, stable. canary is up. numbers below.
## 1. tier-1 12h A/B — confirmed shipped win
windows: pre = 06-09 06:00–18:00Z (b49a95a, calm day); post = 06-11 18:00Z –
06-12 06:00Z (v0.0.4, stable overnight). medians, canary excluded:
| metric | pre | post | ratio |
|---|---|---|---|
| frames in/s | 345 | 375 | 1.09× (more load) |
| **postgres CPU cores** | **0.94** | **0.63** | **0.68× (−38%/frame)** |
| **zlay CPU cores** | **1.36** | **0.98** | **0.72×** |
| zlay RSS GiB | 2.10 | 2.35 | 1.12× |
| pg RSS GiB | 0.74 | 0.85 | 1.14× |
| queue_full | 0 | 0 | — |
| chain_breaks/s | 368 | 165 | 0.45× |
| hosts | 3,013 | 2,978 | ~ |
- the zlay-side CPU drop was free — fewer synchronous round-trips per event.
- both RSS upticks are purchases, not leaks: the two 500k LRU caches
(zlay side) and shared_buffers 128→512MB (pg side, operator change).
- note the calm-day pre-window understates your win vs the 7-day pre-tier-1
average (2.16 pg cores): against that baseline it's ~0.5 vs 2.16.
- validation_fail rose 3.46→10.46/s — all `host_authority`: eurosky test
PDSes emitting events for DIDs whose docs point elsewhere; enforcement
doing its job, external cause, watching it.
### pg_stat_statements is now installed — per-query ground truth
(operator confession: installing it cost a 45-min pg crashloop from a
shell-quoting bug in ALTER SYSTEM. fixed; lesson recorded.)
per ~420 commits/s steady state: isAccountActive 419k calls, getAccountState
418k, upsert 256k (0.61× — only validated commits write), **host_id misses
31.9k = 92.4% cache hit rate**, did misses 30.4k. avg exec times all ≤0.03ms
except did-miss (0.27ms).
**new finding for tier 2: xact_commit runs at exactly 2× tracked statement
calls** — every statement carries one untracked extra transaction (shape
suggests driver-level prepare/deallocate or sync round-trip in pg.zig).
halving transactions without touching any query logic may be the cheapest
remaining postgres win. measured simultaneously over 60s: 15.7k tx/s vs
7.8k stmt/s during catch-up; the 2:1 held at steady state too.
## 2. canary (musl + mimalloc static) — day 1: alive and clean
built ee67980 exactly as specified (`-Dtarget=x86_64-linux-musl
-Doptimize=ReleaseSafe -Duse_mimalloc=true`), verified `statically linked`,
unstripped binary kept at `/opt/zlay-canary/zlay-unstripped-ee67980` for
symbolization. fully isolated: own postgres instance, own PVCs, own
credentials, no ingress, deliberately **no k8s probes** so any crash is the
process dying, not a probe kill. manifests:
relay repo `zlay/deploy/zlay-canary.yaml`.
1. **SIGILL: zero kernel traps** since start (checked node kernel journal
directly; cores are still disabled node-wide so the journal is the
sentinel). RocksDB opened clean, collection index building from live
firehose from scratch.
2. **listReposByCollection exercised**: paged app.bsky.feed.like 5×1000 with
stable cursors + post/follow/long-tail collections — read path + LRU
clean. will re-exercise harder as the index grows (and can trigger a
collection backfill once it has run longer, which is the real RocksDB
hammer).
3. **RSS: 1.4 GiB at ~70 min / 1,600 hosts** — but that's cold-start
(index compaction, account-state churn, did-cache fill). not yet
comparable to your ~1.1 GiB glibc steady-state figure; will report the
settled number after a quiet day. early shape is plausible, not a
regression flag.
4. stability: 0 restarts, queue_full 0, decode_errors 34 (noise), 614k
frames in the first 40 min.
## 3. open items on your side, with new evidence
- **shutdown GPF (libc+0x50f)**: still 3-for-3 on SIGTERM. core specimen
`/var/crash/core.zlay.1781157122.1040178` + b49a95a binary in buildah
storage. your unjoined-subscriber-threads lead is consistent with what we
see (it only ever fires during teardown).
- **new: ingestion stall, 06-11 ~16:15Z–17:40Z.** frames dropped to ~0/s for
~75 min while all ~2,965 host connections stayed established — eval showed
74%→DOWN×3. it unwedged at the exact moment postgres restarted (zlay's
pool connections reset). zlay's own pg pool/DbRequestQueue getting wedged
while sockets stay healthy is the shape; relay_db_queue_depth was 0 with
handled_total low when inspected after the fact, so the wedge may sit
between frame workers and the pool, not in the queue itself. timeline is
precise if you want correlated logs. this one produced an hour of
data loss with zero alerting — it's my top candidate for your next
robustness item after the GPF.
— operator