Skip to content

v43 enables concurrency support by default causing high overhead for repeated synchronous cross-Component function calls #12836

@JoonasBjork

Description

@JoonasBjork

Improvement

Wasmtime v43 Config::new() enables concurrency_support option by default as per the config . This configuration is shipped in wasmtime-v43.0.0-aarch64-macos (tested). In practice, this causes synchronous function calls to have overhead even in Component model binaries that do not use asynchronous features. The culprit seems to be that the FACT module ends up running this code on every synchronous cross-Component function invocation.

After testing a program that repeatedly invokes an empty function over Component boundaries with and without the command line option -W concurrency-support=n, I can see a 50x-100x increase in latency with concurrency-support enabled.

Unfortunately I cannot share code.

Benefit

Disabling the option by default has a significant performance benefits for synchronous Component-model applications that do not need async features. The option should be set only when the used Component needs asynchronous features.

Implementation

Disabling the option in the config by default. Prompting users that want to use async components to enable the feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions