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

Add CLI flags for instance limits #8027

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

abrown
Copy link
Contributor

@abrown abrown commented Feb 28, 2024

While experimenting with wasmtime serve, I found it helpful to be able to configure some of the maximum limits of the various objects stored in the pooling allocator. This change surfaces some new -O total-* flags for controlling these limits from the command line.

While experimenting with `wasmtime serve`, I found it helpful to be able
to configure some of the maximum limits of the various objects stored in
the pooling allocator. This change surfaces some new `-O total-*` flags
for controlling these limits from the command line.
@abrown abrown requested a review from a team as a code owner February 28, 2024 23:54
@abrown abrown requested review from alexcrichton and removed request for a team February 28, 2024 23:54
pub total_tables: Option<u32>,

/// The maximum number of WebAssembly stacks which can be created.
pub total_stacks: Option<u32>,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option here, since all of these default to the same number currently, is to have a single flag --total-pool-slots or the like that sets all of these together. But maybe someone wants to control these in a bit more fine-grained way, so I went down this route instead.

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed having all the knobs here is fine, the goal is to reflect the options of Config on the CLI and this does that well.

Mind adding pool or pooling at the front of the options though to emphasize that they're only used as configuration to the pooling allocator?

@abrown abrown requested a review from alexcrichton March 1, 2024 19:19
@alexcrichton alexcrichton added this pull request to the merge queue Mar 1, 2024
Merged via the queue into bytecodealliance:main with commit 480fb0e Mar 1, 2024
19 checks passed
@abrown abrown deleted the cli-limits branch March 1, 2024 21:04
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.

2 participants