Q&A: My CognitiveCycle tick is exceeding 100ms — how do I diagnose which module is slow? #145
Unanswered
web3guru888
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Question
I'm running the CognitiveCycle and seeing occasional ticks that take 180ms+ (well over the 100ms target). The logs show
cycle.module_errorevents but I can't tell which tier or module is the bottleneck. What's the right debugging workflow?Answer
There are three layers of instrumentation you can use, from quickest to most thorough.
Step 1: Read the
CycleFaultSummaryEvery tick writes a
CycleFaultSummaryto the Blackboard (Issue #140). Start here:Or use the SSE endpoint:
Step 2: Inspect
TierTimingfrom the CycleProfilerThe
CycleProfiler(Issue #126) records per-tier and per-module timing. If you see one tier taking much longer than expected, drill down:Common patterns:
Step 3: Check circuit breaker state
If a module is consistently slow, it may already be in
HALF_OPENstate (recovering) and the probe is slow:Step 4: Bisect module loading
If you can't reproduce with the full 29-module stack, use the minimal module subset guide (Discussion #135) to isolate which modules are needed for your workload. A 5-module tick should complete in <20ms on most hardware.
Common root causes
reasoningmodule doing synchronous file I/Oasyncio.to_thread()bench_cycle.pysafetyformal_verify taking too longasyncio.set_event_loop_debug(True)to find slow callbacksRelated resources
All reactions