You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since this time is spent on every pod start, my assumption is that it affects performance, in particular for applications with a higher number of components and assets.
I'd like to see if we can improve this, potentially by implementing a Spin application loader that directly uses the runwasi list of WasmLayers and skips all the copies.
The text was updated successfully, but these errors were encountered:
Yes, they are already in memory via the WasmLayers struct. There is a concept of a Cache in Spin which currently reads from a specific folder, which is why we write the files to disk. I thought we might be able to create a new implementation of the cache that reads from the pre-loaded memory instead of writing to disk then reading it again. This would speed things up a bit by avoiding the IO but may not be ideal in all cases when the there are lots of files.
The startup time for a Spin application distributed as an OCI artifact is affected by several copies of the Wasm components and static assets on disk.
load_from_cache
(https://github.com/spinkube/containerd-shim-spin/blob/a42715e542a167d7b02a6725cf6d6d0fa96c1912/containerd-shim-spin/src/engine.rs#L165), which in turn calls Spin's loader, which copies the files into a temporary directory: https://github.com/fermyon/spin/blob/7f55409a7b75c8dc52bc77fdaa5ba1e71a524b8d/crates/oci/src/loader.rs#L103Since this time is spent on every pod start, my assumption is that it affects performance, in particular for applications with a higher number of components and assets.
I'd like to see if we can improve this, potentially by implementing a Spin application loader that directly uses the runwasi list of
WasmLayer
s and skips all the copies.The text was updated successfully, but these errors were encountered: