dbb5dc71e7e39a249a9b3e341f0604215ffdfd9a
[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         simpleReplicatedLogEntry = "org.opendaylight.controller.cluster.raft.persisted.SimpleReplicatedLogEntrySerializer"
67       }
68
69       serialization-bindings {
70         "com.google.protobuf.Message" = proto
71         "org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransaction" = readylocal
72         "org.opendaylight.controller.cluster.raft.persisted.SimpleReplicatedLogEntry" = simpleReplicatedLogEntry
73       }
74
75       default-dispatcher {
76         # Setting throughput to 1 makes the dispatcher fair. It processes 1 message from
77         # the mailbox before moving on to the next mailbox
78         throughput = 1
79       }
80
81       default-mailbox {
82         # When not using a BalancingDispatcher it is recommended that we use the SingleConsumerOnlyUnboundedMailbox
83         # as it is the most efficient for multiple producer/single consumer use cases
84         mailbox-type="akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
85       }
86     }
87     remote {
88       log-remote-lifecycle-events = off
89       # Disable passive connections, as we are seeing issues
90       # with read-only associations
91       use-passive-connections = off
92
93       netty.tcp {
94         maximum-frame-size = 419430400
95         send-buffer-size = 52428800
96         receive-buffer-size = 52428800
97       }
98
99       artery {
100         advanced {
101           #maximum-frame-size = 256 KiB
102           #maximum-large-frame-size = 2 MiB
103         }
104       }
105     }
106
107     cluster {
108       seed-node-timeout = 12s
109
110       # Following is an excerpt from Akka Cluster Documentation
111       # link - http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html
112       # Warning - Akka recommends against using the auto-down feature of Akka Cluster in production.
113       # This is crucial for correct behavior if you use Cluster Singleton or Cluster Sharding,
114       # especially together with Akka Persistence.
115
116       #auto-down-unreachable-after = 30s
117
118       allow-weakly-up-members = on
119
120       use-dispatcher = cluster-dispatcher
121
122       failure-detector.acceptable-heartbeat-pause = 3 s
123     }
124
125     persistence {
126       journal {
127         # The following activates the default segmented file journal. Each persistent actor
128         # is stored in a separate directory, with multiple segment files. Segments are removed
129         # when they are not longer required.
130         #
131         plugin = akka.persistence.journal.segmented-file
132
133         segmented-file {
134           class = "org.opendaylight.controller.akka.segjournal.SegmentedFileJournal"
135           # Root directory for segmented journal storage
136           root-directory = "segmented-journal"
137           # Maximum size of a single entry in the segmented journal
138           max-entry-size = 16M
139           # Maximum size of a segment
140           max-segment-size = 128M
141           # Map each segment into memory. Note that while this can improve performance,
142           # it will also place additional burden on system resources.
143           memory-mapped = false
144         }
145       }
146
147       snapshot-store.local.class = "org.opendaylight.controller.cluster.persistence.LocalSnapshotStore"
148       snapshot-store.plugin = akka.persistence.snapshot-store.local
149     }
150   }
151
152   cluster-dispatcher {
153     type = "Dispatcher"
154     executor = "fork-join-executor"
155     fork-join-executor {
156       parallelism-min = 2
157       parallelism-max = 4
158     }
159   }
160 }