-
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
use SnapTreeMap instead of ConcurrentSkipListMap #6719
Conversation
Maybe other places that use ConcurrentSkipListMap can be replaced too. |
@QiuMM interesting, thanks. FYI, this PR addresses the same problem: #6327 The project's README (https://github.com/nbronson/snaptree) states that the latest released version is 0.2. |
While 35% is spent in the |
@leventov just like nbronson/snaptree#6 said, v0.2 is not deployed at maven central repo. |
as per readme
I do not think it is a good idea to use code that is missing important bugfixes for such critical @dyf6372 seems to me the project is not alive and does not have maintainers thus no one to fix bugs. |
@b-slim I'm not sure, I think it may decrease the number of compare or optimize the concurrency. Since the project seems to be not alive, I agree that it's may not a good idea to use this code now. However, it's really necessary for me to improve the performance in index since we have more than 1200 peon task for one cluster and data growth is fast. I'll try it in my cluster and if it's really work without any mistake I'll give the detail result or benchmark in the future. |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@druid.apache.org list. Thank you for your contributions. |
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
Using jprofiler, I found that the function in ConcurrentSkipListMap was cost more than 30% cpu in our case.
SnapTreeMap is a drop-in replacement for ConcurrentSkipListMap. Form the paper http://ppl.stanford.edu/papers/ppopp207-bronson.pdf:
Experimental evidence shows that our algorithm outperforms a highly tuned concurrent skip list for many access patterns, with an average of 39% higher singlethreaded throughput and 32% higher multi-threaded throughput over a range of contention levels and operation mixes.
After I changing to SnapTreeMap , it's 20%~30% faster than ConcurrentSkipListMap.