490bd876262f7faf160962cd34f72587728a58bf
[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   serialization-dispatcher {
32     type = Dispatcher
33     executor = "fork-join-executor"
34     fork-join-executor {
35       # Min number of threads to cap factor-based parallelism number to
36       parallelism-min = 2
37       # Parallelism (threads) ... ceil(available processors * factor)
38       parallelism-factor = 2.0
39       # Max number of threads to cap factor-based parallelism number to
40       parallelism-max = 15
41     }
42     throughput = 1
43   }
44
45   shard-dispatcher {
46     type = Dispatcher
47     executor = "default-executor"
48
49     # We use a ControlAwareMailbox so that raft messages that implement ControlMessage
50     # are given higher priority.
51     mailbox-type = "org.opendaylight.controller.cluster.common.actor.UnboundedDequeBasedControlAwareMailbox"
52   }
53
54   akka {
55     loglevel = "INFO"
56     loggers = ["akka.event.slf4j.Slf4jLogger"]
57     logger-startup-timeout = 300s
58
59     actor {
60       warn-about-java-serializer-usage = off
61       provider = "akka.cluster.ClusterActorRefProvider"
62       serializers {
63         java = "akka.serialization.JavaSerializer"
64         proto = "akka.remote.serialization.ProtobufSerializer"
65         readylocal = "org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransactionSerializer"
66       }
67
68       serialization-bindings {
69         "com.google.protobuf.Message" = proto
70         "org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransaction" = readylocal
71       }
72
73       default-dispatcher {
74         # Setting throughput to 1 makes the dispatcher fair. It processes 1 message from
75         # the mailbox before moving on to the next mailbox
76         throughput = 1
77       }
78
79       default-mailbox {
80         # When not using a BalancingDispatcher it is recommended that we use the SingleConsumerOnlyUnboundedMailbox
81         # as it is the most efficient for multiple producer/single consumer use cases
82         mailbox-type="akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
83       }
84     }
85     remote {
86       log-remote-lifecycle-events = off
87
88       netty.tcp {
89         maximum-frame-size = 419430400
90         send-buffer-size = 52428800
91         receive-buffer-size = 52428800
92       }
93
94       artery {
95         advanced {
96           #maximum-frame-size = 256 KiB
97           #maximum-large-frame-size = 2 MiB
98         }
99       }
100     }
101
102     cluster {
103       seed-node-timeout = 12s
104
105       # Following is an excerpt from Akka Cluster Documentation
106       # link - http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html
107       # Warning - Akka recommends against using the auto-down feature of Akka Cluster in production.
108       # This is crucial for correct behavior if you use Cluster Singleton or Cluster Sharding,
109       # especially together with Akka Persistence.
110
111       #auto-down-unreachable-after = 30s
112
113       allow-weakly-up-members = on
114
115       use-dispatcher = cluster-dispatcher
116
117       failure-detector.acceptable-heartbeat-pause = 3 s
118     }
119
120     persistence {
121       journal.plugin = akka.persistence.journal.leveldb
122
123       snapshot-store.local.class = "org.opendaylight.controller.cluster.persistence.LocalSnapshotStore"
124       snapshot-store.plugin = akka.persistence.snapshot-store.local
125     }
126   }
127
128   cluster-dispatcher {
129     type = "Dispatcher"
130     executor = "fork-join-executor"
131     fork-join-executor {
132       parallelism-min = 2
133       parallelism-max = 4
134     }
135   }
136 }