-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
performance issue for gov/tally #11422
Comments
Are these for proposals that are still in their voting periods? If so, the cost would come from That being that case, idk what we can really do here. Hope that SMT and/or latest IAVL improvements from Osmosis helps? |
We're testing what we hope to be the last fix for IAVL stability, hopefully we can work on upstreaming it after that. I think thats the only thing that can be done to fix this computation overhead :( We could build accumulators into the state machine, which is probably good long term, but the root cause of slowness here is definitely IAVL & bad levelDB configs. I think on top of the osmosis work, getting a roadmap of levelDB things that we should try in prod to help speed things up is a great move. I know @ValNodes and @marbar have been working on both code to compact more leveldb data for speed + playing around with configs. |
|
Although rather complex, the `govKeeper.Tally` function has no unit tests. This change adds a test that covers around 91% of the code, only some unexpected errors are not covered. If this change is accepted, another will follow to refactor the function into smaller parts (without changing the test). This will address the TODO on top, reduce complexity, improve readability and reusability. This test should also help for issues like cosmos#11422 and cosmos#10353. It's more comfortable to improve performance or completely rewrite the implementation with a high code coverage. The `setupGovKeeper` had to be modified because it was registering some mocks expectations that cannot be overridden. It now takes an additional variadic argument that can be used to better customize the mocks expectations. Also, to improve readability, the mocks are all gathered in a new specific `mocks` struct.
Given that |
Summary of Bug
This is a result query to full node. ( ~ 1TB data)
it takes time 5mins to get gov/tally about single prop (63)
pruned node1 (under 10GB ./data)
pruned node2 (115G ./data)
It takes 7mins to get gov/tally about prop 62, 63.
That means node will stop for 7mins to complete return gov/tally.
In my memory, It has been happening since prop 60.(means node slow down clearly)
I'm wondering
Version
gaiad v6.0.0
Steps to Reproduce
try to get tally result using gRPC.
For Admin Use
The text was updated successfully, but these errors were encountered: