ed6c7b9d64887970a8ad7837cb00d7d3079c9953
[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     # JFR requires boot delegation, which we do not have by default
60     java-flight-recorder {
61       enabled = false
62     }
63
64     actor {
65       warn-about-java-serializer-usage = off
66       provider = "akka.cluster.ClusterActorRefProvider"
67       serializers {
68         java = "akka.serialization.JavaSerializer"
69         proto = "akka.remote.serialization.ProtobufSerializer"
70         readylocal = "org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransactionSerializer"
71         simpleReplicatedLogEntry = "org.opendaylight.controller.cluster.raft.persisted.SimpleReplicatedLogEntrySerializer"
72       }
73
74       serialization-bindings {
75         "com.google.protobuf.Message" = proto
76         "org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransaction" = readylocal
77         "org.opendaylight.controller.cluster.raft.persisted.SimpleReplicatedLogEntry" = simpleReplicatedLogEntry
78       }
79
80       default-dispatcher {
81         # Setting throughput to 1 makes the dispatcher fair. It processes 1 message from
82         # the mailbox before moving on to the next mailbox
83         throughput = 1
84       }
85
86       default-mailbox {
87         # When not using a BalancingDispatcher it is recommended that we use the SingleConsumerOnlyUnboundedMailbox
88         # as it is the most efficient for multiple producer/single consumer use cases
89         mailbox-type="akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
90       }
91     }
92     remote {
93       log-remote-lifecycle-events = off
94       # Disable passive connections, as we are seeing issues
95       # with read-only associations
96       use-passive-connections = off
97
98       classic.netty.tcp {
99         maximum-frame-size = 419430400
100         send-buffer-size = 52428800
101         receive-buffer-size = 52428800
102       }
103
104       artery {
105         enabled = on
106         transport = tcp
107
108         advanced {
109           maximum-frame-size = 400 MiB
110           #maximum-large-frame-size = 2 MiB
111         }
112       }
113     }
114
115     cluster {
116       seed-node-timeout = 12s
117
118       # Following is an excerpt from Akka Cluster Documentation
119       # link - http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html
120       # Warning - Akka recommends against using the auto-down feature of Akka Cluster in production.
121       # This is crucial for correct behavior if you use Cluster Singleton or Cluster Sharding,
122       # especially together with Akka Persistence.
123
124       allow-weakly-up-members = on
125
126       use-dispatcher = cluster-dispatcher
127
128       failure-detector.acceptable-heartbeat-pause = 3 s
129     }
130
131     persistence {
132       journal {
133         # The following activates the default segmented file journal. Each persistent actor
134         # is stored in a separate directory, with multiple segment files. Segments are removed
135         # when they are no longer required.
136         #
137         plugin = akka.persistence.journal.segmented-file
138
139         segmented-file {
140           class = "org.opendaylight.controller.akka.segjournal.SegmentedFileJournal"
141           # Root directory for segmented journal storage
142           root-directory = "segmented-journal"
143           # Maximum size of a single entry in the segmented journal
144           max-entry-size = 16M
145           # Maximum size of a segment
146           max-segment-size = 128M
147           # Map each segment into memory. Defaults to true, use false to keep a heap-based
148           # buffer instead.
149           memory-mapped = true
150         }
151       }
152
153       # Journal configuration for shards that have persistence turned off. They still need to have a journal plugin
154       # configured, since they still need to store things in the journal occasionally, but having larger segment sizes
155       # would be wastefull.
156       non-persistent {
157         journal {
158           class = "org.opendaylight.controller.akka.segjournal.SegmentedFileJournal"
159           # Root directory for segmented journal storage
160           root-directory = "segmented-journal"
161           # Maximum size of a single entry in the segmented journal
162           max-entry-size = 512K
163           # Maximum size of a segment
164           max-segment-size = 1M
165           # Map each segment into memory. Note that while this can improve performance,
166           # it will also place additional burden on system resources.
167           memory-mapped = false
168         }
169       }
170
171       snapshot-store.local.class = "org.opendaylight.controller.cluster.persistence.LocalSnapshotStore"
172       snapshot-store.plugin = akka.persistence.snapshot-store.local
173     }
174   }
175
176   cluster-dispatcher {
177     type = "Dispatcher"
178     executor = "fork-join-executor"
179     fork-join-executor {
180       parallelism-min = 2
181       parallelism-max = 4
182     }
183   }
184 }