dicej opened issue #8846:
Since
wasmtime serve
was switched to using the pooling allocator, which defaults to a memory limit of 10MB, components built with e.g.componentize-py
orcomponentize-dotnet
will no longer run by default. Also, since there is currently no CLI option to override that memory limit, the only workaround is to disable the pooling allocator entirely usingwasmtime serve -O pooling-allocator=n
.I propose that we address this with the following changes:
- Increase the default memory limit in the pooling allocator to something like 100MB
- Allow the default to be overridden via a CLI option
- Provide a helpful suggestion to use that option when the component can't be run due to the memory limit
dicej commented on issue #8846:
See also https://github.com/bytecodealliance/wasmtime/issues/8504 and https://github.com/bytecodealliance/componentize-py/issues/94
dicej commented on issue #8846:
Also, (mainly to help search engines find this issue) this is the kind of error message you get:
Error: memory index 0 has a minimum page size of 223 which exceeds the limit of 160
alexcrichton commented on issue #8846:
Can you test whether
-Opooling-max-memory-size=N
enables running these components? Sorry I keep meaning to raise the limit here and keep forgetting, but I also want to confirm orthogonally that this option works since that's what it's supposed to do
dicej commented on issue #8846:
$ wasmtime serve -Opooling-max-memory-size=160 -S cli target/component.wasm error: unknown -O / --optimize option: pooling-max-memory-size
dicej edited a comment on issue #8846:
$ wasmtime --version wasmtime-cli 21.0.1 (cedf9aa0f 2024-05-22) $ wasmtime serve -Opooling-max-memory-size=160 -S cli target/component.wasm error: unknown -O / --optimize option: pooling-max-memory-size
Maybe that's new on
main
?
alexcrichton commented on issue #8846:
I think that might be Wasmtime 21+, what version do you have for that?
dicej commented on issue #8846:
Sorry, just edited the comment; it's 21.0.1
alexcrichton commented on issue #8846:
Oh sorry, for some reason I had Wasmtime 22 installed instead of the 21 version, which explains this!
alexcrichton closed issue #8846:
Since
wasmtime serve
was switched to using the pooling allocator, which defaults to a memory limit of 10MB, components built with e.g.componentize-py
orcomponentize-dotnet
will no longer run by default. Also, since there is currently no CLI option to override that memory limit, the only workaround is to disable the pooling allocator entirely usingwasmtime serve -O pooling-allocator=n
.I propose that we address this with the following changes:
- Increase the default memory limit in the pooling allocator to something like 100MB
- Allow the default to be overridden via a CLI option
- Provide a helpful suggestion to use that option when the component can't be run due to the memory limit
Last updated: Dec 23 2024 at 12:05 UTC