Switch default persistence to segmented-journal
[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         # This would activate the deprecated levedb persistence plugin. This plugin was used
128         # by default by all OpenDaylight versions, but is considered not ready for production
129         # use by Akka. Magnesium defaults to segmented-file journal (below) and this option will
130         # be removed in a future release.
131         #
132         # plugin = akka.persistence.journal.leveldb
133
134         # The following activates the default segmented file journal. Each persistent actor
135         # is stored in a separate directory, with multiple segment files. Segments are removed
136         # when they are not longer required.
137         #
138         plugin = akka.persistence.journal.segmented-file
139
140         segmented-file {
141           class = "org.opendaylight.controller.akka.segjournal.SegmentedFileJournal"
142           # Root directory for segmented journal storage
143           root-directory = "segmented-journal"
144           # Maximum size of a single entry in the segmented journal
145           max-entry-size = 16M
146           # Maximum size of a segment
147           max-segment-size = 128M
148           # Map each segment into memory. Note that while this can improve performance,
149           # it will also place additional burden on system resources.
150           memory-mapped = false
151         }
152       }
153
154       snapshot-store.local.class = "org.opendaylight.controller.cluster.persistence.LocalSnapshotStore"
155       snapshot-store.plugin = akka.persistence.snapshot-store.local
156     }
157   }
158
159   cluster-dispatcher {
160     type = "Dispatcher"
161     executor = "fork-join-executor"
162     fork-join-executor {
163       parallelism-min = 2
164       parallelism-max = 4
165     }
166   }
167 }

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