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 ad18d43..99bba6b 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 980289f..61d55ea 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;
         }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.