Bug 5740: Configure control-aware mailbox
[controller.git] / opendaylight / md-sal / sal-clustering-config / src / main / resources / initial / factory-akka.conf
1
2 odl-cluster-data {
3   bounded-mailbox {
4     mailbox-type = "org.opendaylight.controller.cluster.common.actor.MeteredBoundedMailbox"
5     mailbox-capacity = 5000
6     mailbox-push-timeout-time = 10ms
7   }
8
9   metric-capture-enabled = true
10
11   notification-dispatcher {
12     # Dispatcher is the name of the event-based dispatcher
13     type = Dispatcher
14     # What kind of ExecutionService to use
15     executor = "fork-join-executor"
16     # Configuration for the fork join pool
17     fork-join-executor {
18       # Min number of threads to cap factor-based parallelism number to
19       parallelism-min = 2
20       # Parallelism (threads) ... ceil(available processors * factor)
21       parallelism-factor = 3.0
22       # Max number of threads to cap factor-based parallelism number to
23       parallelism-max = 15
24     }
25     # Throughput defines the maximum number of messages to be
26     # processed per actor before the thread jumps to the next actor.
27     # Set to 1 for as fair as possible.
28     throughput = 1
29   }
30
31   shard-dispatcher {
32     type = Dispatcher
33     executor = "default-executor"
34
35     # We use a ControlAwareMailbox so that raft messages that implement ControlMessage
36     # are given higher priority.
37     mailbox-type = "org.opendaylight.controller.cluster.common.actor.UnboundedDequeBasedControlAwareMailbox"
38   }
39
40   akka {
41     loglevel = "INFO"
42     loggers = ["akka.event.slf4j.Slf4jLogger"]
43     logger-startup-timeout = 300s
44
45     actor {
46       warn-about-java-serializer-usage = off
47       provider = "akka.cluster.ClusterActorRefProvider"
48       serializers {
49         java = "akka.serialization.JavaSerializer"
50         proto = "akka.remote.serialization.ProtobufSerializer"
51         readylocal = "org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransactionSerializer"
52       }
53
54       serialization-bindings {
55         "com.google.protobuf.Message" = proto
56         "org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransaction" = readylocal
57       }
58
59       default-dispatcher {
60         # Setting throughput to 1 makes the dispatcher fair. It processes 1 message from
61         # the mailbox before moving on to the next mailbox
62         throughput = 1
63       }
64
65       default-mailbox {
66         # When not using a BalancingDispatcher it is recommended that we use the SingleConsumerOnlyUnboundedMailbox
67         # as it is the most efficient for multiple producer/single consumer use cases
68         mailbox-type="akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
69       }
70     }
71     remote {
72       log-remote-lifecycle-events = off
73
74       netty.tcp {
75         maximum-frame-size = 419430400
76         send-buffer-size = 52428800
77         receive-buffer-size = 52428800
78       }
79
80       artery {
81         advanced {
82           maximum-frame-size = 1 GiB
83           maximum-large-frame-size = 1 GiB
84         }
85       }
86     }
87
88     cluster {
89       seed-node-timeout = 12s
90  
91       # Following is an excerpt from Akka Cluster Documentation
92       # link - http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html
93       # Warning - Akka recommends against using the auto-down feature of Akka Cluster in production.
94       # This is crucial for correct behavior if you use Cluster Singleton or Cluster Sharding, 
95       # especially together with Akka Persistence.
96
97       #auto-down-unreachable-after = 30s
98
99       allow-weakly-up-members = on
100
101       use-dispatcher = cluster-dispatcher
102
103       failure-detector.acceptable-heartbeat-pause = 3 s
104     }
105
106     persistence {
107       journal.plugin = akka.persistence.journal.leveldb
108
109       snapshot-store.local.class = "org.opendaylight.controller.cluster.persistence.LocalSnapshotStore"
110       snapshot-store.plugin = akka.persistence.snapshot-store.local
111     }
112   }
113
114   cluster-dispatcher {
115     type = "Dispatcher"
116     executor = "fork-join-executor"
117     fork-join-executor {
118       parallelism-min = 2
119       parallelism-max = 4
120     }
121   }
122 }

©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.