-
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
perf: message pool: change locks to RWMutexes for performance #10561
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.
Generally looks good, we can switch to RLock in message selection as well.
… also verify that the the calculation is cached after grabbing the write lock. if it is not cached, give up the lock, calculate, and then grab the write lock again
closed #10545 for this -- The lock contention seems gone from the eth rpc path now! 100 requests per second compared with 8 seconds per request :) :)
|
I'm looking into the failing tests not sure if actual or flaky |
hmm definitely still seeing problems with this - not ready just yet |
Ok great! I think the last issue was repub needs Lock not RLock tests are passing now, ready for review |
…tly releasing the lock 2x
… bounds on size of cache
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
latest bench from #41ea5a6f638ca5108a51f70a4cef85d9b98802b7
|
Related Issues
should effect #10538 because of message pool locks
Proposed Changes
message pool has two locks - change mp.lk and mp.curTsLk to RW locks for API efficiency
Additional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps