From ca67094619ef2e896e9a0af135964e8fc0d3ec2a Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Fri, 11 May 2018 10:11:15 -0500 Subject: [PATCH] Change default raft threshold config values and add a section to upgrade notes --- agent/consul/config.go | 6 +++--- website/source/docs/upgrade-specific.html.md | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/agent/consul/config.go b/agent/consul/config.go index 976f16bdba..6966b5628a 100644 --- a/agent/consul/config.go +++ b/agent/consul/config.go @@ -449,10 +449,10 @@ func DefaultConfig() *Config { conf.RaftConfig.ShutdownOnRemove = false // Check every 5 seconds to see if there are enough new entries for a snapshot, can be overridden - conf.RaftConfig.SnapshotInterval = 5 * time.Second + conf.RaftConfig.SnapshotInterval = 30 * time.Second - // Snapshots are created every 8192 entries by default, can be overridden - conf.RaftConfig.SnapshotThreshold = 8192 + // Snapshots are created every 16384 entries by default, can be overridden + conf.RaftConfig.SnapshotThreshold = 16384 return conf } diff --git a/website/source/docs/upgrade-specific.html.md b/website/source/docs/upgrade-specific.html.md index e02eb0e742..508c5c563d 100644 --- a/website/source/docs/upgrade-specific.html.md +++ b/website/source/docs/upgrade-specific.html.md @@ -26,6 +26,17 @@ The following previously deprecated fields and config options have been removed: - The [deprecated set of metric names](/docs/upgrade-specific.html#metric-names-updated) (beginning with `consul.consul.`) has been removed along with the `enable_deprecated_names` option from the metrics configuration. +#### New defaults for Raft Snapshot Creation +Consul 1.0.1 (and earlier versions of Consul) checked for raft snapshots every +5 seconds, and created new snapshots for every 8192 writes. These defaults cause +constant disk IO in large busy clusters. Consul 1.1.0 increases these to larger values, +and makes them tunable via the [raft_snapshot_interval](/docs/agent/options.html#_raft_snapshot_interval) and +[raft_snapshot_threshold](/docs/agent/options.html#_raft_snapshot_threshold) parameters. We recommend +keeping the new defaults. However, operators can go back to the old defaults by changing their +config if they prefer more frequent snapshots. See the documentation for [raft_snapshot_interval](/docs/agent/options.html#_raft_snapshot_interval) +and [raft_snapshot_threshold](/docs/agent/options.html#_raft_snapshot_threshold) to understand the trade-offs +when tuning these. + ## Consul 1.0.1 #### Carefully Check and Remove Stale Servers During Rolling Upgrades