[concurrency-interest] ConcurrentSkipListMap performance
davidcholmes at aapt.net.au
Sun Oct 23 18:01:03 EDT 2011
As Ben said, not enough details to be able to interpret or diagnoze. Details
on the test system - how may processors vs. cores vs HT might be useful.
I also don't find 3888ms a negligible difference.
From: concurrency-interest-bounces at cs.oswego.edu
[mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Ted Yu
Sent: Monday, 24 October 2011 5:02 AM
To: concurrency-interest at cs.oswego.edu
Subject: [concurrency-interest] ConcurrentSkipListMap performance
HBase expects ConcurrentSkipListMap to have good performance.
See the following discussion.
Comments are welcome.
---------- Forwarded message ----------
From: Akash Ashok <thehellmaker at gmail.com>
Date: Sun, Oct 23, 2011 at 2:57 AM
Subject: Re: SILT - nice keyvalue store paper
To: dev at hbase.apache.org
I was running some similar tests and came across a surprising finding. I
compared reads and write on ConcurrentSkipListMap ( which the memstore uses)
and synchronized TreeMap ( Which was literally treemap synchronized).
Executed concurrent reads, writes and deletes on both of them.
Surprisingly synchronized treeMap performed better, though just slightly
better, than ConcurrentSkipListMap which KeyValueSkipListSet uses.
Here are the output of a few runs
Sometimes the difference was considerable
Using HBaseMap it took 20438ms
Using TreeMap it took 11613ms
And sometimes the difference was negligible
Using HBaseMap it took 13370ms
Using TreeMap it took 9482ms
I've attaching the test java file which I wrote to test it.
This might be a very minor differece but still surprising considering the
fact that ConcurrentSkipListMap uses fancy 2 level indexes which they say
improves the deletion performance.
And here are the details about the test run.
100 Threads each fetching 10,000 records
100 threads each adding 10,000 records.
100 threads each deletin 10,000 records
( Reads, Writes and deletes simultaneously )
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest