From c5a9d548358f64483b9fc1726f1a64722c4cdf6f Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 13 Jan 2017 18:00:28 -0800 Subject: [PATCH] etcdserver: increase snapshot to 100,000 Keep more wal entries in memory for fast follower recovery. 10,000 was a too small number that triggers quite a few snapshots. ZK proves that 100,000 is a reasonable number for even old less prowerful machines. Eventually we should provide both count and max memory (for large entries). --- Documentation/op-guide/configuration.md | 2 +- etcdmain/help.go | 2 +- etcdserver/server.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/op-guide/configuration.md b/Documentation/op-guide/configuration.md index 1ae45f51a24..c6fa33e66cf 100644 --- a/Documentation/op-guide/configuration.md +++ b/Documentation/op-guide/configuration.md @@ -28,7 +28,7 @@ To start etcd automatically using custom settings at startup in Linux, using a [ ### --snapshot-count + Number of committed transactions to trigger a snapshot to disk. -+ default: "10000" ++ default: "100000" + env variable: ETCD_SNAPSHOT_COUNT ### --heartbeat-interval diff --git a/etcdmain/help.go b/etcdmain/help.go index 0ce4be636cc..6c0868fac4e 100644 --- a/etcdmain/help.go +++ b/etcdmain/help.go @@ -42,7 +42,7 @@ member flags: path to the data directory. --wal-dir '' path to the dedicated wal directory. - --snapshot-count '10000' + --snapshot-count '100000' number of committed transactions to trigger a snapshot to disk. --heartbeat-interval '100' time (in milliseconds) of a heartbeat interval. diff --git a/etcdserver/server.go b/etcdserver/server.go index 37621c7e56d..9ed57d1b3d5 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -61,7 +61,7 @@ import ( ) const ( - DefaultSnapCount = 10000 + DefaultSnapCount = 100000 StoreClusterPrefix = "/0" StoreKeysPrefix = "/1"