-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Multithreaded vote processor #4600
Multithreaded vote processor #4600
Conversation
I tested this on a local network, and somehow the multi-threaded approach behaves inferior to the current develop branch. Here are the grafana stats |
That's interesting, thanks for testing @gr0vity-dev. This would imply that the overhead of lock contention is the largest factor here. I fixed a small bug with thread notifications, but I don't think it should have a significant impact. It would be great if you could run your tests with various settings for |
A frame graph would be good at identifying what's causing the slowdown, seems odd that one thread would be the fastest for an explicitly CPU-bound task. |
d484dac
to
8d6001d
Compare
8d6001d
to
02b5c82
Compare
I received the flamegraph and was able to identify the bottleneck. It's now fixed and multithreaded version seems to perform better than single threaded, as expected. |
13616dc
to
91cb94d
Compare
I did another side by side run between develop and the improved multi-threaded vote processor Here are the detailed grafana stats |
…rom pwojcikdev/vote-processor-threads Multithreaded vote processor
Changes vote processor to use multiple threads. While processing of votes inside the election container is still done under exclusive lock, this should help amortize time spent checking vote signatures.