-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
skip unnecessary event check #4517
skip unnecessary event check #4517
Conversation
…essary event check.
@whyrusleeping @magik6k @hannahhoward when new tipset incoming, it triggers headchange in events from chainnotify api. every deal has a matcher to check in this loop. This is a very time-consuming operation. even use this PR, it still costs about 16s with 59086 deals. if every block (which is 5 in a tipset) costs 16s, it will heap the buffer in chain notify up, and cause tipset cache can't keep up with the chain.(entire headchange should complete less than 30s in a epoch) I investigated some code above. but the event checking and handleing still need more optimize. it is still the bottleneck of deal processing. |
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.
This is a good change, but it looks like some tests need to be fixed
@leviok with regards to the number of deals you mentioned above 59,086: Approximately how many of these deals are in the process of becoming active at the same time? |
|
every deal checking need to load state of f05 here. i think cache it or something else changes with the same effect make sense. |
I think the issue here is the way that the events API state matching works:
There are a couple of problems:
|
Fixed in #4623, and then improved in a bunch of other PRs |
Deal state checking currently takes a long time. With an average of 5 blocks per epoch, this can significantly reduce time-consuming.
As I mentioned in PR and slack. I had to turn off deal reception twice due to the issue.
After this modification, my miner can handle deal state correctly now. But this is still temporary. as number of deals increased, event checking will fail to keep up with the chain again.
additional info: