Add SegmentedFileJournal
[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
90       netty.tcp {
91         maximum-frame-size = 419430400
92         send-buffer-size = 52428800
93         receive-buffer-size = 52428800
94       }
95
96       artery {
97         advanced {
98           #maximum-frame-size = 256 KiB
99           #maximum-large-frame-size = 2 MiB
100         }
101       }
102     }
103
104     cluster {
105       seed-node-timeout = 12s
106
107       # Following is an excerpt from Akka Cluster Documentation
108       # link - http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html
109       # Warning - Akka recommends against using the auto-down feature of Akka Cluster in production.
110       # This is crucial for correct behavior if you use Cluster Singleton or Cluster Sharding,
111       # especially together with Akka Persistence.
112
113       #auto-down-unreachable-after = 30s
114
115       allow-weakly-up-members = on
116
117       use-dispatcher = cluster-dispatcher
118
119       failure-detector.acceptable-heartbeat-pause = 3 s
120     }
121
122     persistence {
123       journal {
124         plugin = akka.persistence.journal.leveldb
125
126         # The following activates the alternative segmented file journal. Each persistent actor
127         # is stored in a separate directory, with multiple segment files. Segments are removed
128         # when they are not longer required.
129         #
130         # plugin = akka.persistence.journal.segmented-file
131         segmented-file {
132           class = "org.opendaylight.controller.akka.segjournal.SegmentedFileJournal"
133           # Root directory for segmented journal storage
134           root-directory = "segmented-journal"
135           # Maximum size of a single entry in the segmented journal
136           max-entry-size = 16M
137           # Maximum size of a segment
138           max-segment-size = 128M
139           # Map each segment into memory. Note that while this can improve performance,
140           # it will also place additional burden on system resources.
141           memory-mapped = false
142         }
143       }
144
145       snapshot-store.local.class = "org.opendaylight.controller.cluster.persistence.LocalSnapshotStore"
146       snapshot-store.plugin = akka.persistence.snapshot-store.local
147     }
148   }
149
150   cluster-dispatcher {
151     type = "Dispatcher"
152     executor = "fork-join-executor"
153     fork-join-executor {
154       parallelism-min = 2
155       parallelism-max = 4
156     }
157   }
158 }