-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamically determine whether to pool for wasmtime serve
#8610
Merged
alexcrichton
merged 1 commit into
bytecodealliance:main
from
alexcrichton:conditionally-pool-on-serve
May 14, 2024
Merged
Dynamically determine whether to pool for wasmtime serve
#8610
alexcrichton
merged 1 commit into
bytecodealliance:main
from
alexcrichton:conditionally-pool-on-serve
May 14, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit aims to address bytecodealliance#8607 by dynamically determining whether the pooling allocator should be used rather than unconditionally using it. It looks like some systems don't have enough virtual memory to support the default configuration settings so this should help `wasmtime serve` work on those systems. Closes bytecodealliance#8607
abrown
approved these changes
May 13, 2024
I'm going to seek confirmation this fixes the issue before merging since I don't have a system to test on myself. |
I can confirm that it works on the VisionFive 2 board (RISCV64) and the Nvidia Jetson Nano board. |
Thanks for the confirmation! |
alexcrichton
added a commit
to alexcrichton/spin
that referenced
this pull request
May 14, 2024
This commit is intended to address fermyon#2119 and mirror bytecodealliance/wasmtime#8610. The base problem is that some systems are configured with smaller amounts of virtual memory than other systems, for example some aarch64 and riscv64 systems are shown to have only 39 bits of virtual address space rather than the 48 by default on x86_64. This means that the pooling allocator can't be initialized on these platforms since it needs more virtual memory than that. This changes Spin to dynamically choosing whether to use the pooling allocator. It's still used by default in Wasmtime but a dynamic probe is performed to determine whether it's going to work first. While here I also added an env var to control this behavior for an escape hatch if that's needed in the future too. Closes fermyon#2119
alexcrichton
added a commit
to alexcrichton/spin
that referenced
this pull request
May 14, 2024
This commit is intended to address fermyon#2119 and mirror bytecodealliance/wasmtime#8610. The base problem is that some systems are configured with smaller amounts of virtual memory than other systems, for example some aarch64 and riscv64 systems are shown to have only 39 bits of virtual address space rather than the 48 by default on x86_64. This means that the pooling allocator can't be initialized on these platforms since it needs more virtual memory than that. This changes Spin to dynamically choosing whether to use the pooling allocator. It's still used by default in Wasmtime but a dynamic probe is performed to determine whether it's going to work first. While here I also added an env var to control this behavior for an escape hatch if that's needed in the future too. Closes fermyon#2119 Signed-off-by: Alex Crichton <alex@alexcrichton.com>
calebschoepp
pushed a commit
to calebschoepp/spin
that referenced
this pull request
May 15, 2024
This commit is intended to address fermyon#2119 and mirror bytecodealliance/wasmtime#8610. The base problem is that some systems are configured with smaller amounts of virtual memory than other systems, for example some aarch64 and riscv64 systems are shown to have only 39 bits of virtual address space rather than the 48 by default on x86_64. This means that the pooling allocator can't be initialized on these platforms since it needs more virtual memory than that. This changes Spin to dynamically choosing whether to use the pooling allocator. It's still used by default in Wasmtime but a dynamic probe is performed to determine whether it's going to work first. While here I also added an env var to control this behavior for an escape hatch if that's needed in the future too. Closes fermyon#2119 Signed-off-by: Alex Crichton <alex@alexcrichton.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit aims to address #8607 by dynamically determining whether the pooling allocator should be used rather than unconditionally using it. It looks like some systems don't have enough virtual memory to support the default configuration settings so this should help
wasmtime serve
work on those systems.Closes #8607