-
Notifications
You must be signed in to change notification settings - Fork 12
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
Avoid synchronization on GetQueues #116
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Laurent Klock <[email protected]>
Signed-off-by: Laurent Klock <[email protected]>
Finalized AbstractFrontierService modification (removal of synchronizations on queues) Signed-off-by: Laurent Klock <[email protected]>
Thanks @klockla, sounds good |
c13f23d
to
10bc16e
Compare
Signed-off-by: Laurent Klock <[email protected]>
Signed-off-by: Laurent Klock <[email protected]>
Signed-off-by: Laurent Klock <[email protected]>
Signed-off-by: Laurent Klock <[email protected]>
…erence to the order entry in the value map (huge boost on remove operation by avoiding searching the matching key) Signed-off-by: Laurent Klock <[email protected]>
Signed-off-by: Laurent Klock <[email protected]>
…tion iterators Signed-off-by: Laurent Klock <[email protected]>
10bc16e
to
0f52dcc
Compare
Signed-off-by: Laurent Klock <[email protected]>
Hello @jnioche I'm going to drop the others..but your feedback is welcome |
Thanks. What's the difference between Bench, ReadHeavy and WriteHeavy? |
The code is written from scratch. You can see the different performance tests in ConcurrentMapStressTest.java Basically, in bench every thread are just doing put, gets and a remove every 2 loop cycle. |
The purpose of this PR is to avoid the synchronization on the internal queue map.
The synchronized(getQueues()) call causes contention during long queue traversals which are very likely to occur during calls to countURLs & ListURLs.
This change is based on the ConcurrentOrdereredMap class which uses StampLock to provide fine
fine-grained locking over the concurrent map.
(alternative in ConcurrentLinkedHashMap based on ReentrantLock, need to compare under stress tests)
Signed-off-by: Laurent Klock [email protected]