-
Notifications
You must be signed in to change notification settings - Fork 3
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
Optimize EOS VM OC memory slice count for parallel read-only transactions #155
Comments
@spoonincode can you confirm that this captures the spirit of your original issue, and that the task list seems accurate? |
@bhazzard to consolidate into #148 |
@spoonincode , what is the benefit of using this mirroring technique vs mprotect. I assume it is for performance. Have we measured the difference? |
Right, it's a performance improvement. Unfortunately today the improvement can't fully be realized because,
but if those improvements were to be made, growing memory would literally be changing the value of a register, full stop. That's obviously significantly faster than |
Thanks Matt. Still, how often are we growing memory when executing an action? Maybe we could have a higher initial memory, and larger increments, so that we wouldn't have to grow memory often, and the cost of the |
Closing this one. Will track AntelopeIO/leap#645 as part of #149 Not deleting, for conversation history. |
Description
Reduce the threshold where EOS VM OC transitions from mirroring to mprotect() to conserve virtual memory, in order to enable parallel read-only transactions in a resource-efficient manner.
Summary
The current implementation of EOS VM OC uses a memory mirroring technique that requires a significant amount of virtual memory to support larger WASM memory sizes. With the recent modifications to support up to 4GiB of WASM memory, EOS VM OC now requires about 4.2TiB of virtual memory to support 16 parallel read-only transactions. This poses a significant challenge as it exceeds the virtual memory limit on most processors.
To address this challenge, the team needs to reduce the threshold at which EOS VM OC transitions from memory mirroring to mprotect(). This will help conserve virtual memory and enable parallel read-only transactions in a more resource-efficient manner. The team plans to gather data points from existing contract usage to determine a suitable threshold and add a compile knob to define the threshold number of pages where the transition occurs.
This work will contribute to the larger initiative of taking further advantage of parallel processing in LEAP v5.0.0. The EOS and Antelope community will benefit from improved performance and scalability of the platform.
Tasks
Original Issue
This was originally reported by @spoonincode. Here is the text of Matt's original issue:
The text was updated successfully, but these errors were encountered: