Repository: hbase
Updated Branches:
  refs/heads/branch-1.3 e304e210e -> 06762cd4d


HBASE-15971 Regression: Random Read/WorkloadC slower in 1.x than 0.98 Restore 
FIFO as the default in place of 'deadline' that sorted on request priority. The 
sort costs us throughput. Enable it if you want it rather than have it as 
default.

Name threads to include the scheduler type.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/06762cd4
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/06762cd4
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/06762cd4

Branch: refs/heads/branch-1.3
Commit: 06762cd4d84b3b881060d515095ffa6111b16071
Parents: e304e21
Author: stack <st...@apache.org>
Authored: Mon Jun 13 15:26:13 2016 -0700
Committer: stack <st...@apache.org>
Committed: Tue Jun 14 16:59:17 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/ipc/SimpleRpcScheduler.java    | 41 ++++++++++++--------
 1 file changed, 24 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/06762cd4/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
index 431aeeb..19f36ab 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcScheduler.java
@@ -49,11 +49,16 @@ public class SimpleRpcScheduler extends RpcScheduler 
implements ConfigurationObs
   public static final String CALL_QUEUE_HANDLER_FACTOR_CONF_KEY =
       "hbase.ipc.server.callqueue.handler.factor";
 
-  /** If set to 'deadline', uses a priority queue and deprioritize 
long-running scans */
-  public static final String CALL_QUEUE_TYPE_CONF_KEY = 
"hbase.ipc.server.callqueue.type";
+  /**
+   * The default, 'fifo', has the least friction but is dumb.
+   * If set to 'deadline', uses a priority queue and deprioritizes 
long-running scans. Sorting by
+   * priority comes at a cost, reduced throughput.
+   */
   public static final String CALL_QUEUE_TYPE_CODEL_CONF_VALUE = "codel";
   public static final String CALL_QUEUE_TYPE_DEADLINE_CONF_VALUE = "deadline";
   public static final String CALL_QUEUE_TYPE_FIFO_CONF_VALUE = "fifo";
+  public static final String CALL_QUEUE_TYPE_CONF_KEY = 
"hbase.ipc.server.callqueue.type";
+  public static final String CALL_QUEUE_TYPE_CONF_DEFAULT = 
CALL_QUEUE_TYPE_FIFO_CONF_VALUE;
 
   /** max delay in msec used to bound the deprioritized requests */
   public static final String QUEUE_MAX_CALL_DELAY_CONF_KEY
@@ -177,7 +182,7 @@ public class SimpleRpcScheduler extends RpcScheduler 
implements ConfigurationObs
     this.abortable = server;
 
     String callQueueType = conf.get(CALL_QUEUE_TYPE_CONF_KEY,
-      CALL_QUEUE_TYPE_DEADLINE_CONF_VALUE);
+        CALL_QUEUE_TYPE_FIFO_CONF_VALUE);
     float callqReadShare = conf.getFloat(CALL_QUEUE_READ_SHARE_CONF_KEY, 0);
     float callqScanShare = conf.getFloat(CALL_QUEUE_SCAN_SHARE_CONF_KEY, 0);
 
@@ -197,44 +202,46 @@ public class SimpleRpcScheduler extends RpcScheduler 
implements ConfigurationObs
       // multiple read/write queues
       if (callQueueType.equals(CALL_QUEUE_TYPE_DEADLINE_CONF_VALUE)) {
         CallPriorityComparator callPriority = new CallPriorityComparator(conf, 
this.priority);
-        callExecutor = new RWQueueRpcExecutor("RW.default", handlerCount, 
numCallQueues,
+        callExecutor = new RWQueueRpcExecutor("RW.deadline.Q", handlerCount, 
numCallQueues,
             callqReadShare, callqScanShare, maxQueueLength, conf, abortable,
             BoundedPriorityBlockingQueue.class, callPriority);
       } else if (callQueueType.equals(CALL_QUEUE_TYPE_CODEL_CONF_VALUE)) {
         Object[] callQueueInitArgs = {maxQueueLength, codelTargetDelay, 
codelInterval,
           codelLifoThreshold, numGeneralCallsDropped, numLifoModeSwitches};
-        callExecutor = new RWQueueRpcExecutor("RW.default", handlerCount,
+        callExecutor = new RWQueueRpcExecutor("RW.codel.Q", handlerCount,
           numCallQueues, callqReadShare, callqScanShare,
           AdaptiveLifoCoDelCallQueue.class, callQueueInitArgs,
           AdaptiveLifoCoDelCallQueue.class, callQueueInitArgs);
       } else {
-        callExecutor = new RWQueueRpcExecutor("RW.default", handlerCount, 
numCallQueues,
+        callExecutor = new RWQueueRpcExecutor("RW.fifo.Q", handlerCount, 
numCallQueues,
           callqReadShare, callqScanShare, maxQueueLength, conf, abortable);
       }
     } else {
       // multiple queues
       if (callQueueType.equals(CALL_QUEUE_TYPE_DEADLINE_CONF_VALUE)) {
         CallPriorityComparator callPriority = new CallPriorityComparator(conf, 
this.priority);
-        callExecutor = new BalancedQueueRpcExecutor("B.default", handlerCount, 
numCallQueues,
-          conf, abortable, BoundedPriorityBlockingQueue.class, maxQueueLength, 
callPriority);
+        callExecutor =
+          new BalancedQueueRpcExecutor("B.deadline.Q", handlerCount, 
numCallQueues,
+            conf, abortable, BoundedPriorityBlockingQueue.class, 
maxQueueLength, callPriority);
       } else if (callQueueType.equals(CALL_QUEUE_TYPE_CODEL_CONF_VALUE)) {
-        callExecutor = new BalancedQueueRpcExecutor("B.default", handlerCount, 
numCallQueues,
-          conf, abortable, AdaptiveLifoCoDelCallQueue.class, maxQueueLength,
-          codelTargetDelay, codelInterval, codelLifoThreshold,
-          numGeneralCallsDropped, numLifoModeSwitches);
+        callExecutor =
+          new BalancedQueueRpcExecutor("B.codel.Q", handlerCount, 
numCallQueues,
+            conf, abortable, AdaptiveLifoCoDelCallQueue.class, maxQueueLength,
+            codelTargetDelay, codelInterval, codelLifoThreshold,
+            numGeneralCallsDropped, numLifoModeSwitches);
       } else {
-        callExecutor = new BalancedQueueRpcExecutor("B.default", handlerCount,
+        callExecutor = new BalancedQueueRpcExecutor("B.fifo.Q", handlerCount,
             numCallQueues, maxQueueLength, conf, abortable);
       }
     }
 
     // Create 2 queues to help priorityExecutor be more scalable.
     this.priorityExecutor = priorityHandlerCount > 0 ?
-        new BalancedQueueRpcExecutor("Priority", priorityHandlerCount, 2, 
maxPriorityQueueLength) :
-        null;
-
+      new BalancedQueueRpcExecutor("B.priority.fifo.Q", priorityHandlerCount, 
2,
+          maxPriorityQueueLength):
+      null;
    this.replicationExecutor =
-     replicationHandlerCount > 0 ? new BalancedQueueRpcExecutor("Replication",
+     replicationHandlerCount > 0 ? new 
BalancedQueueRpcExecutor("B.replication.fifo.Q",
        replicationHandlerCount, 1, maxQueueLength, conf, abortable) : null;
   }
 

Reply via email to