Stream: git-wasmtime

Topic: wasmtime / issue #11449 Expose pooling allocator runtime ...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2025 at 15:35):

lann opened issue #11449:

This is similar to #2640 but is about pull rather than push metrics.

The pooling allocator has a bunch of configurable limits. It can be difficult to understand the runtime behavior of a system to decide how to tune those limits, so it would be helpful to expose some runtime metrics to embedders.

For the API, we could crib from tokio with something like Engine::metrics(&self) -> RuntimeMetrics and RuntimeMetrics::pooling_allocator_live_core_instances(&self) -> u64.

I've been looking at the allocator code and I think I have a rough understanding of how to implement what I'm most interested in:

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2025 at 17:26):

alexcrichton commented on issue #11449:

Sounds like a very reasonable design to me! The only thing I'd to a minor bikeshed on is something like Engine::pooling_allocator_metrics(&self) -> Option<PoolingAllocatorMetrics> to handle the defaults-vs-pooling distinction. A general Engine::metrics could focus on generic things like instance count perhaps which makes sense to track for all allocators instead of just pooling.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 22 2025 at 16:25):

alexcrichton closed issue #11449:

This is similar to #2640 but is about pull rather than push metrics.

The pooling allocator has a bunch of configurable limits. It can be difficult to understand the runtime behavior of a system to decide how to tune those limits, so it would be helpful to expose some runtime metrics to embedders.

For the API, we could crib from tokio with something like Engine::metrics(&self) -> RuntimeMetrics and RuntimeMetrics::pooling_allocator_live_core_instances(&self) -> u64.

I've been looking at the allocator code and I think I have a rough understanding of how to implement what I'm most interested in:


Last updated: Dec 06 2025 at 06:05 UTC