perf(scripting): cut out-of-process runner host CPU; compile timeout from compile start; quiet start-failure logs (lmxopcua#789, #790, #788)
v2-ci / unit-tests (push) Has been cancelled
v2-ci / unit-tests (push) Has been cancelled
#789 (partial, further tuning deferred): combining inline frame writer, buffered frame reader, one timer per evaluation for T and T+G, slot release on the reader before the caller resumes, a non-spinning per-connection result dispatcher, and blocking pipe I/O on Unix (both ends) so the socket never enters the socket engine; TerminateJobObject kill on Windows. macOS host CPU at 10k evals/s K=2: 228-240 % -> 79 % (InProcess 69 %, IPC share +10 vs budget 25); windev 153 % -> 123 % (+115, still a miss). Harness reports the "vs InProcess" share, warm-cache worker RSS, and times kill latency from the soft-timeout answer. #790: the worker sends LoadStarted; the compile timeout is armed then, so a load queued behind other compiles is never killed or struck. #788: one Error with stack per down period, rate-limited Warnings with attempt count, one Information on recovery. Design doc §8.2 notes + §12.2 record. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -26,6 +26,7 @@ message Envelope {
|
||||
DiagnosticsRequest diag_request = 21; // host -> worker (tests / ops)
|
||||
DiagnosticsReply diag_reply = 22; // worker -> host
|
||||
Cancel cancel = 23; // host -> worker, at the soft deadline
|
||||
LoadStarted load_started = 24; // worker -> host, when a compile thread picks a load up (lmxopcua#790)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +40,7 @@ message Hello {
|
||||
uint32 max_log_lines = 7; // outbound log buffer cap
|
||||
string pe_cache_dir = 8; // the node's compiled-PE cache (design §7); empty = no cache
|
||||
bytes pe_cache_key = 9; // its HMAC key; the worker loads only entries that verify under it
|
||||
uint32 compile_threads = 10; // dedicated compile threads; 0 = the worker's default (min(8, max(1, CPUs/2)))
|
||||
}
|
||||
|
||||
message Ready {
|
||||
@@ -81,6 +83,13 @@ enum PeCache {
|
||||
PE_CACHE_REJECTED = 3; // an entry failed verification, was deleted, and the source was compiled
|
||||
}
|
||||
|
||||
// A compile thread has taken the load off the worker's queue and is about to compile (or PE-load) it. The host's load
|
||||
// timeout runs from here, not from when the host sent the load: a load queued behind other compiles is not stuck and
|
||||
// must not be blamed for the queue (lmxopcua#790).
|
||||
message LoadStarted {
|
||||
uint64 load_id = 1;
|
||||
}
|
||||
|
||||
message LoadResult {
|
||||
uint64 load_id = 1;
|
||||
repeated LoadOutcome outcomes = 2;
|
||||
|
||||
Reference in New Issue
Block a user