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

Speed up the module cache 6x by removing LZW compression #4031

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

Michael-F-Bryan
Copy link
Contributor

Description

While troubleshooting slow start times for wasmer run, we noticed that using LZW compression when caching compiled modules to the filesystem (wasmer_wasix::runtime::module_cache::FileSystemCache) incurs about a very noticeable 6x performance penalty.

For perspective, compiling php.wasm with cranelift took about 4.75 seconds on a M1 Mac.

Without LZW compression:

  • FileSystemCache::save(): 408ms, 142MB binary
  • FileSystemCache::load(): 155ms

With LZW compression:

  • FileSystemCache::save(): 2.4s, 72MB binary
  • FileSystemCache::load(): 822ms

Check out the conversation on Slack for more context.

Copy link
Contributor

@ptitSeb ptitSeb left a comment

Choose a reason for hiding this comment

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

seems fine

@Michael-F-Bryan Michael-F-Bryan merged commit bf5b569 into master Jun 26, 2023
@Michael-F-Bryan Michael-F-Bryan deleted the remove-cache-compression branch June 26, 2023 07:51
@Michael-F-Bryan Michael-F-Bryan mentioned this pull request Aug 8, 2023
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