Bug 7449: Add custom dispatcher for message serialization/slicing 97/59297/4
authorTom Pantelis <tompantelis@gmail.com>
Wed, 21 Jun 2017 15:11:49 +0000 (11:11 -0400)
committerRobert Varga <nite@hq.sk>
Mon, 26 Jun 2017 14:12:23 +0000 (14:12 +0000)
This will be used in subsequent patches to parallelize message
message serialization/slicing.

Change-Id: I6b89e1a61e10d743b24d834807d5a27bfc6e5c2b
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-clustering-config/src/main/resources/initial/factory-akka.conf
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/Dispatchers.java

index ad18d436118db4e1d69ad570bbcd85ca4341c3ef..99bba6bba11b8e9653f6448fb6dc1b976ff99217 100644 (file)
@@ -28,6 +28,20 @@ odl-cluster-data {
     throughput = 1
   }
 
+  serialization-dispatcher {
+    type = Dispatcher
+    executor = "fork-join-executor"
+    fork-join-executor {
+      # Min number of threads to cap factor-based parallelism number to
+      parallelism-min = 2
+      # Parallelism (threads) ... ceil(available processors * factor)
+      parallelism-factor = 2.0
+      # Max number of threads to cap factor-based parallelism number to
+      parallelism-max = 15
+    }
+    throughput = 1
+  }
+
   shard-dispatcher {
     type = Dispatcher
     executor = "default-executor"
@@ -87,11 +101,11 @@ odl-cluster-data {
 
     cluster {
       seed-node-timeout = 12s
+
       # Following is an excerpt from Akka Cluster Documentation
       # link - http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html
       # Warning - Akka recommends against using the auto-down feature of Akka Cluster in production.
-      # This is crucial for correct behavior if you use Cluster Singleton or Cluster Sharding, 
+      # This is crucial for correct behavior if you use Cluster Singleton or Cluster Sharding,
       # especially together with Akka Persistence.
 
       #auto-down-unreachable-after = 30s
index 980289fcf9762d8e2167d107060c4f122aad3172..61d55ea4305e87861df9a24e6f4b2145694411e1 100644 (file)
@@ -17,6 +17,7 @@ public class Dispatchers {
     public static final String TXN_DISPATCHER_PATH = "txn-dispatcher";
     public static final String SHARD_DISPATCHER_PATH = "shard-dispatcher";
     public static final String NOTIFICATION_DISPATCHER_PATH = "notification-dispatcher";
+    public static final String SERIALIZATION_DISPATCHER_PATH = "serialization-dispatcher";
 
     private final akka.dispatch.Dispatchers dispatchers;
 
@@ -24,9 +25,11 @@ public class Dispatchers {
         Client(CLIENT_DISPATCHER_PATH),
         Transaction(TXN_DISPATCHER_PATH),
         Shard(SHARD_DISPATCHER_PATH),
-        Notification(NOTIFICATION_DISPATCHER_PATH);
+        Notification(NOTIFICATION_DISPATCHER_PATH),
+        Serialization(SERIALIZATION_DISPATCHER_PATH);
 
         private final String path;
+
         DispatcherType(String path) {
             this.path = path;
         }