Prewarm wasm workers before accepting requests

This commit is contained in:
udo
2026-07-16 21:00:46 +00:00
parent 83c05111a9
commit ee2177f4b4
4 changed files with 23 additions and 0 deletions
+5
View File
@@ -137,6 +137,11 @@ own import vector, memory/table-base globals, GOT globals and function-table
slots, then runs relocations, constructors, and request-pointer binding. This
removes repeated Wasmtime import-type traversal without sharing request state or
changing core-first, unit-load-order symbol resolution.
Each FastCGI child initializes its process-local Wasmtime engine after fork and
before entering the accept loop. This preserves Wasmtime's fork boundary while
preventing the first request assigned to each worker from paying engine startup.
Startup duration or failure is written to the service log.
`request_perf()` reports worker module-cache hits and misses and divides a miss
into artifact lookup, wasm read, custom-section parse, serialized-module
deserialization or wasm compilation, and immutable import classification. This