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
Currently the way we implement threads in Wasm means that every new thread grows the single shared Wasm memory. Since Wasm provides no way to shrink the memory, this results in the memory usage growing with every new thread (i.e. every block executed) until it hits a browser-imposed limit and crashes.
Some solutions to this problem that I think should work, in ascending order of difficulty:
change linera-protocol to use a fixed-size pool of threads that are re-used when executing bytecode
change wasm-bindgen to use multiple memories, so that the thread's memory can be added to a fresh memory that is freed when the thread ends
change our fork of wasm-thread to track a thread's used memory and release it when the thread exits
The text was updated successfully, but these errors were encountered:
Currently the way we implement threads in Wasm means that every new thread grows the single shared Wasm memory. Since Wasm provides no way to shrink the memory, this results in the memory usage growing with every new thread (i.e. every block executed) until it hits a browser-imposed limit and crashes.
Some solutions to this problem that I think should work, in ascending order of difficulty:
linera-protocol
to use a fixed-size pool of threads that are re-used when executing bytecodewasm-bindgen
to use multiple memories, so that the thread's memory can be added to a fresh memory that is freed when the thread endswasm-thread
to track a thread's used memory and release it when the thread exitsThe text was updated successfully, but these errors were encountered: