Skip to content
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

Allow 4G memories by default in the pooling allocator #8849

Conversation

alexcrichton
Copy link
Member

This commit raises the default setting of max_memory_size in the pooling allocator from 10M to 4G. This won't actually impact the virtual memory reserved in the pooling allocator because we already reserved 6G of virtual memory for each linear memory this instead allows access to all of it by default. This matches the default behavior of Wasmtime for the non-pooling allocator which is to not artificially limit memory by default.

The main impact of this setting is that the memory-protection-keys feature, which is disabled by default, will have no effect by default unless max_memory_size is also configured to something smaller than 4G. The documentation has been updated to this effect.

Closes #8846

This commit raises the default setting of `max_memory_size` in the
pooling allocator from 10M to 4G. This won't actually impact the virtual
memory reserved in the pooling allocator because we already reserved 6G
of virtual memory for each linear memory this instead allows access to
all of it by default. This matches the default behavior of Wasmtime for
the non-pooling allocator which is to not artificially limit memory by
default.

The main impact of this setting is that the memory-protection-keys
feature, which is disabled by default, will have no effect by default
unless `max_memory_size` is also configured to something smaller than
4G. The documentation has been updated to this effect.

Closes bytecodealliance#8846
@alexcrichton alexcrichton requested a review from a team as a code owner June 20, 2024 15:22
@alexcrichton alexcrichton requested review from elliottt and removed request for a team June 20, 2024 15:22
@alexcrichton alexcrichton added this pull request to the merge queue Jun 20, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 20, 2024
@alexcrichton alexcrichton added this pull request to the merge queue Jun 20, 2024
Merged via the queue into bytecodealliance:main with commit ea22acb Jun 20, 2024
36 checks passed
@alexcrichton alexcrichton deleted the increase-pooling-allocator-defaults branch June 20, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wasmtime serve can't run components requiring >10MB of memory by default
3 participants