-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(prover): speed up LWG and NWG #2661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Async job loading looks like the right thing. I fail to understand how moving to blocking thread helps with serialization/deserialization. Did you run tests both ways (sync/async)?
Yes, the difference is noticeable. In different cases, the strategy for using threads by tokio may be different depending on blocking/non-blocking context. tldr: afaik, async is single-threaded, but blocking tasks aren’t |
So, my understanding is that when you start a blocking process you get a thread only for that blocking process (and more might be added, if there're more blocking asks or be blocked until the runtime can get one). I totally fail to understand what is going on behind the hood that could make it faster. @popzxc -- maybe you understand? |
|
|
Discussed in DMs. I had the misconception that the runtime scheduler runs in its own thread. It runs as a regular task, therefore all blocking tasks can slow it down. We have some ser/deser in here (maybe 1ms each) and also |
🤖 I have created a release *beep* *boop* --- ## [16.5.0](prover-v16.4.0...prover-v16.5.0) (2024-08-28) ### Features * **prover_cli:** Add test for status, l1 and config commands. ([#2263](#2263)) ([6a2e3b0](6a2e3b0)) * **prover_cli:** Stuck status ([#2441](#2441)) ([232a817](232a817)) * **prover:** Add ProverJobMonitor ([#2666](#2666)) ([e22cfb6](e22cfb6)) * **prover:** parallelized memory queues simulation in BWG ([#2652](#2652)) ([b4ffcd2](b4ffcd2)) * Provide easy prover setup ([#2683](#2683)) ([30edda4](30edda4)) ### Bug Fixes * **prover_cli:** Remove congif file check ([#2695](#2695)) ([2f456f0](2f456f0)) * **prover_cli:** Update prover cli README ([#2700](#2700)) ([5a9bbb3](5a9bbb3)) * **prover:** change bucket for RAM permutation witnesses ([#2672](#2672)) ([8b4cbf4](8b4cbf4)) * **prover:** fail when fri prover job is not found ([#2711](#2711)) ([8776875](8776875)) * **prover:** Revert use of spawn_blocking in LWG/NWG ([#2682](#2682)) ([edfcc7d](edfcc7d)) * **prover:** speed up LWG and NWG ([#2661](#2661)) ([6243399](6243399)) * **vm:** Fix used bytecodes divergence ([#2741](#2741)) ([923e33e](923e33e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
What ❔
Locally, with additional artificial network delays (500 ms), a x5 speed up is observed
Checklist
zk fmt
andzk lint
.