[ https://issues.apache.org/jira/browse/HBASE-14331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14742911#comment-14742911 ]
Lars Hofhansl commented on HBASE-14331: --------------------------------------- Thanks for looking into this [~ikeda]. I usually test these things on just a single machine (I set up a single node HDFS, and a single node HBase on top of that). Especially for region server optimization such as this one, that would be sufficient. Personally I would prefer a series of smaller patches. I.e. can't we just optionally replace the LinkedBlockingQueues used with with the SemaphoreBased* based ones, and then add the nice factories in a 2nd patch? But I see [~ram_krish] seems to like the other code you added. That's good enough :) Questions: Do you think that with this patch we can get rid of the multi call queue logic? I.e. go back have a single queue (or one for reader and one for writers). I also really like your suggestion about not waiting when we reached the queue limit, but return a failure code to the client. We can easily do that with your semaphore approach. > a single callQueue related improvements > --------------------------------------- > > Key: HBASE-14331 > URL: https://issues.apache.org/jira/browse/HBASE-14331 > Project: HBase > Issue Type: Improvement > Components: IPC/RPC, Performance > Reporter: Hiroshi Ikeda > Assignee: Hiroshi Ikeda > Priority: Minor > Attachments: BlockingQueuesPerformanceTestApp-output.pdf, > BlockingQueuesPerformanceTestApp-output.txt, > BlockingQueuesPerformanceTestApp.java, CallQueuePerformanceTestApp.java, > HBASE-14331-V2.patch, HBASE-14331-V3.patch, HBASE-14331.patch, > HBASE-14331.patch, SemaphoreBasedBlockingQueue.java, > SemaphoreBasedLinkedBlockingQueue.java, > SemaphoreBasedPriorityBlockingQueue.java > > > {{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}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)