Skip to content

Add CLI flags for instance limits#8027

Merged
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
abrown:cli-limits
Mar 1, 2024
Merged

Add CLI flags for instance limits#8027
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
abrown:cli-limits

Conversation

@abrown
Copy link
Copy Markdown
Member

@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
Comment thread crates/cli-flags/src/lib.rs Outdated
pub total_tables: Option<u32>,

/// The maximum number of WebAssembly stacks which can be created.
pub total_stacks: Option<u32>,
Copy link
Copy Markdown
Member 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
Copy Markdown
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
@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