From 05e17d00984e8af4880b8ad34d5bb1de697af24d Mon Sep 17 00:00:00 2001 From: Jan Gutter Date: Wed, 13 Aug 2025 10:56:19 +0100 Subject: [PATCH] Update ZooKeeper autopurge recommendation * This updates Zuul's recommendation to follow opendev's default: https://opendev.org/opendev/system-config/commit/1a48e06b545affdcc82bcd7b351d9c3e4a74d1f9 * Also adds some explanation for newbies to ZK. * Update some example zoo.cfg files to have this setting. Change-Id: Iac5440e09916cad79709eb4c1f93acf71e1e90bc --- doc/source/examples/zoo.cfg | 2 +- doc/source/howtos/zookeeper.rst | 8 +++++--- tools/zoo.cfg | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/source/examples/zoo.cfg b/doc/source/examples/zoo.cfg index 7f0cbf7cba..685e42e7fc 100644 --- a/doc/source/examples/zoo.cfg +++ b/doc/source/examples/zoo.cfg @@ -4,7 +4,7 @@ tickTime=2000 initLimit=5 syncLimit=2 autopurge.snapRetainCount=3 -autopurge.purgeInterval=0 +autopurge.purgeInterval=2 maxClientCnxns=1000 standaloneEnabled=true admin.enableServer=true diff --git a/doc/source/howtos/zookeeper.rst b/doc/source/howtos/zookeeper.rst index b4b51618b1..caca171a81 100644 --- a/doc/source/howtos/zookeeper.rst +++ b/doc/source/howtos/zookeeper.rst @@ -15,10 +15,12 @@ The following general configuration setting in .. code-block:: - autopurge.purgeInterval=6 + autopurge.purgeInterval=2 -This instructs ZooKeeper to purge old snapshots every 6 hours. This -will avoid filling the disk. +ZooKeeper's default config will never purge snapshots, causing the +disk to eventually fill up. This instructs ZooKeeper to purge old +snapshots every 2 hours. This covers most use cases. This value +depends on load and available disk space. .. _zk-encrypted-connections: diff --git a/tools/zoo.cfg b/tools/zoo.cfg index 7d9f3cee40..56b96ca6fc 100644 --- a/tools/zoo.cfg +++ b/tools/zoo.cfg @@ -5,7 +5,7 @@ tickTime=2000 initLimit=5 syncLimit=2 autopurge.snapRetainCount=3 -autopurge.purgeInterval=0 +autopurge.purgeInterval=2 maxClientCnxns=1000 standaloneEnabled=true admin.enableServer=true