Skip to content

Commit b4a2760

Browse files
jsteemannjwierzbo
andauthored
do not enable server statistics for agent instances (#300)
The arangodb starter seems to set the `--server.statistics false` parameter for agents, which disables all statistics. The original motivation for this was to turn off a background thread in the instance that periodically writes statistics into RocksDB. This background writing of the statistics history causes load and more disk space usage, which we want to avoid on agent instances. However, setting `--server.statistics false` not only disables the background writing of statistics into RocksDB, but also the statistics API and metrics for process statistics. As it was not ideal to have a single startup option to control two different things, since 3.4.9 arangod provides a separate option `--server.statistics-history`. This option controls whether the statistics are written to RocksDB. This is what we want to turn off. The good thing is that when this option is not set, it automatically turns itself off on agents and DB servers. The defaults in arangod are: * `--server.statistics`: always `true`, for all instance types * `--server.statistics-history`: `true` for coordinators, single servers and active failover instances, `false` for agents and DB servers. These are already the optimal settings, so that the arangodb starter does not need to set any statistics-related startup options for arangod. This PR modifies the starter to not set any of the above arangod startup options, as the arangod defaults seem good enough since at least 3.4.9. Co-authored-by: jwierzbo <[email protected]>
1 parent fdadd00 commit b4a2760

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

service/arangod_config_builder.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ func createArangodArgs(log zerolog.Logger, config Config, clusterConfig ClusterC
216216
optionPair{"--agency.size", strconv.Itoa(clusterConfig.AgencySize)},
217217
optionPair{"--agency.supervision", "true"},
218218
optionPair{"--foxx.queues", "false"},
219-
optionPair{"--server.statistics", "false"},
220219
)
221220
for _, p := range clusterConfig.AllAgents() {
222221
if p.ID != myPeerID {
@@ -235,19 +234,16 @@ func createArangodArgs(log zerolog.Logger, config Config, clusterConfig ClusterC
235234
optionPair{"--cluster.my-address", myTCPURL},
236235
optionPair{"--cluster.my-role", "PRIMARY"},
237236
optionPair{"--foxx.queues", "false"},
238-
optionPair{"--server.statistics", "true"},
239237
)
240238
case definitions.ServerTypeCoordinator:
241239
opts = append(opts,
242240
optionPair{"--cluster.my-address", myTCPURL},
243241
optionPair{"--cluster.my-role", "COORDINATOR"},
244242
optionPair{"--foxx.queues", "true"},
245-
optionPair{"--server.statistics", "true"},
246243
)
247244
case definitions.ServerTypeSingle:
248245
opts = append(opts,
249246
optionPair{"--foxx.queues", "true"},
250-
optionPair{"--server.statistics", "true"},
251247
)
252248
}
253249
if serverType == definitions.ServerTypeCoordinator {

0 commit comments

Comments
 (0)