Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Abandoned
-
None
-
None
-
None
Description
LinkedBlockingQueue well separates locks between the take method and the put method, but not between takers, and not between putters. These methods are implemented to take locks at the almost beginning of their logic. HBASE-11355 introduces multiple call-queues to reduce such possible congestion, but I doubt that it is required to stick to BlockingQueue.
There are the other shortcomings of using BlockingQueue. When using multiple queues, since BlockingQueue blocks threads it is required to prepare enough threads for each queue. It is possible that there is a queue starving for threads while there is another queue where threads are idle. Even if you can tune parameters to avoid such situations, the tuning is not so trivial.
I suggest using a single ConcurrentLinkedQueue with Semaphore.
Attachments
Attachments
Issue Links
- is related to
-
HBASE-15594 [YCSB] Improvements
- Resolved