-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaxos.properties
161 lines (130 loc) · 4.89 KB
/
paxos.properties
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#####################################
### JPaxosPMEM configuration file ###
#####################################
# units: bytes or milliseconds, unless other specified
### List of processes ###
# A process is described by:
# process.<id> = <address>:<port for replicas>:<port for clients>
process.0 = localhost:2021:3001
process.1 = localhost:2022:3002
process.2 = localhost:2023:3003
### System model ###
# JPaxosPMEM does not support IndirectConsensus. Any other setting results in
# runtime exception. This is a legacy JPaxos setting.
IndirectConsensus = False
# Failure detector
#
# How long to wait until suspecting the leader.
#Default: 1000
FDSuspectTimeout = 1500
# Interval between sending heartbeats.
# Default: 500
FDSendTimeout = 500
# The crash model for this system. Only Pmem is allowed, any other setting
# results in runtime exception. Other models are supported by JPaxos.
# Possible choices:
# Pmem uses PMDK to store the data vital for recovery data
# on persistent memory. Supports catastrophic failures.
# Assumes that the service uses pmem to persist its state
# at every operation.
# See 'NvmBaseDir' and 'NvmPoolSize'
#
# Default: Pmem
CrashModel = Pmem
# Location where PMDK pool files (persistent memory files) are placed.
# File naming patter is: NvmBaseDir + "/jpaxos." + localId
#
# Default: /mnt/pmem
NvmBaseDir = /mnt/pmem
# Fixed size of persistent memory pool
#
# Default: 256 * 1024 * 1024 Bytes
NvmPoolSize = 1073741824
### Concurrency and optimization setup ###
# Maximum number of concurrently proposed instances.
# Default: 2
WindowSize = 7
# Maximum size of batches.
# Default: 65507
#
# The leader will try to batch requests in a single proposal to improve performance.
# This setting controls how big the batches can be before having to be sent.
# This value may be exceeded if a request is larger than the BatchSize.
BatchSize = 81920
# Maximum time a batch may be delayed starting from the time the first
# request is added to it.
# Default: 10
#
# A batch is sent either when it's full (reaches BatchSize) or this delay elapses.
MaxBatchDelay = 10
# After this may decided instances waiting for execution proposing stalls
DecidedButNotExecutedThreshold = 128
# Size of a buffer for reading client requests; larger requests than this
# size will cause extra memory allocation and freeing at each such request.
# This variable impacts memory usage, as each client connection
# pre-allocates such buffer.
# Default: 8212 (8kB request + 20B header size)
replica.ClientRequestBufferSize = 8212
# How the replica generates client IDs.
# Options:
# - ViewEpoch - combined view/epoch and sequential number.
# - TimeBased - Prefix a timestamp generated by the server to the client ID
# - Simple - Use a sequentially generated number.
# ViewEpoch is theoretically correct in all models.
# TimeBased is practically correct in all models, in theory incorrect in all models.
# Simple is crash-stop only.
#
# Default: ViewEpoch
#
ClientIDGenerator = ViewEpoch
# If set to true, then the leader attempts to make all clients go to another replica
RedirectClientsFromLeader = false
### Networking section ###
# Main protocol used to communicate between replicas. Options:
# - TCP
# - NIO (better TCP impl)
# - TCPNIO (working better TCP impl)
# - UDP - does not support messages beyond 64KB
# - Multicast - does not support messages beyond 64KB
# - Generic - Uses UDP for small (<64KB) messages and TCP for larger messages
# Default: TCP
#Network = Multicast
#Network = TCP
#Network = NIO
Network = TCPNIO
# Threshold used by GenericNetwork to send packets using
# UDP (size<=MaxUDPPacketSize) or TCP (size>MaxUDPPacketSize).
# Default: 65507
MaxUDPPacketSize = 65507
# Initial time of message retransmission
# Default: 1000
RetransmitTimeoutMilisecs = 1000
# If a TCP connection fails, how much to wait for another try
# Default: 1000
TcpReconnectMilisecs = 1000
# Number of threads used to read and write requests from clients.
# -1 for automatic tuning based on the number of CPUs available.
#
# Default: -1
replica.SelectorThreads = -1
### Request forwarding to the leader section ###
# Whether a replica should forward client requests to the current leader or
# if should redirect the client to connect to the leader directly.
#
# Default: true
replica.ForwardClientRequests = true
# Maximum size of the batches of client requests sent by non-leader replicas to
# the leader. Applies only when request forwarding is enabled.
#
# Default: 1450
replica.ForwardMaxBatchSize = 1450
# Maximum delay since a batch with client requests is started until it is sent to
# the leader. Applies only when request forwarding is enabled.
#
# Default: 50
replica.ForwardMaxBatchDelay = 50
# How long can the proposer / catch-up wait for batch values during view
# change / catching up, in milliseconds
#
# Default: 2500
TimeoutFetchBatchValue = 2500