Conversation
✅ Deploy Preview for golemcloud canceled.
|
|
📖 Docs preview: https://docs-dlpy2nia3-golem-cloud.vercel.app Built from commit |
|
Updated verification now covers the permit-ownership billing window end to end. The A durable |
Implements GOL-113.
Summary
Behavior
Memory meters integrate each worker's allocated linear-memory bytes over the period in which it owns a concurrent-agent permit. This includes guest execution, replay, host calls, host I/O waits, and scheduler waits that occur while the permit remains held, as well as non-durable work that keeps the worker non-reclaimable. Waiting to acquire a permit is not billed. Loaded-idle, warm-runnable, and unloaded workers accrue nothing after permit release. Long-running occupancy is settled incrementally during regular resource-usage batches.
One canonical per-worker tracker sums every unique unshared Wasmtime linear-memory backing, including non-exported memories while deduplicating aliases. Initial allocation, committed
memory.grow, aggregate per-worker limits, executor admission grants, oplog/status reconstruction, billing samples, and metrics all use this same total. Growth is charged prospectively: elapsed time is settled at the old size before the committed delta updates the tracker.Meters retain byte-nanosecond precision locally and transfer final fractional remainders to account scope, allowing usage from short-lived workers to combine into complete GB-seconds. Usage batches keep the existing non-retry behavior after ambiguous transport failures to avoid double charging, and the Prometheus counter advances only for whole GB-seconds successfully delivered to the registry.
The effective maximum memory per worker and monthly memory allowance resolve from plan defaults, ceilings, and active account overrides. Override changes honor configurability, optional expiry, lower/default and upper/ceiling validation. Plan changes clamp overrides above a new ceiling or remove them when the dimension is no longer user-configurable. The per-worker maximum remains a safety cap; billing always uses allocated memory rather than the limit.
The registry and CLI expose current and historical memory usage plus effective per-worker limits and monthly allowances. Protobuf and oplog additions preserve persisted-worker compatibility, and the Wasmtime fork supplies unique-memory enumeration and committed-growth notification. WebAssembly threads and shared memories are explicitly unsupported and rejected; arbitrary components with multiple unshared memories remain supported.
Wasmtime
golem-wasmtime-v46.0.1-p3