From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 9 Dec 2018 00:48:46 +0300 From: Konstantin Osipov Subject: Re: [PATCH v2 10/10] wal: trigger checkpoint if there are too many WALs Message-ID: <20181208214846.GL2217@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: * Vladimir Davydov [18/12/09 00:15]: > Closes #1082 > > @TarantoolBot document > Title: Document box.cfg.checkpoint_wal_threshold > > Tarantool makes checkpoints every box.cfg.checkpoint_interval seconds > and keeps last box.cfg.checkpoint_count checkpoints. It also keeps all > intermediate WAL files. Currently, it isn't possible to set a checkpoint > trigger based on the sum size of WAL files, which makes it difficult to > estimate the minimal amount of disk space that needs to be allotted to a > Tarantool instance for storing WALs to eliminate the possibility of > ENOSPC errors. For example, under normal conditions a Tarantool instance > may write 1 GB of WAL files every box.cfg.checkpoint_interval seconds > and so one may assume that 1 GB times box.cfg.checkpoint_count should be > enough for the WAL partition, but there's no guarantee it won't write 10 > GB between checkpoints when the load is extreme. > > So we've agreed that we must provide users with one more configuration > option that could be used to impose the limit on the sum size of WAL > files. The new option is called box.cfg.checkpoint_wal_threshold. Once > the configured threshold is exceeded, the WAL thread notifies the > checkpoint daemon that it's time to make a new checkpoint and delete > old WAL files. Note, the new option only limits the size of WAL files > created since the last checkpoint, because backup WAL files are not > needed for recovery and can be deleted in case of emergency ENOSPC, for > more details see tarantool/tarantool#1082, tarantool/tarantool#3397, > tarantool/tarantool#3822. > > The default value of the new option is 1 exabyte (10^18 byte), which > actually means that the feature is disabled. OK to push. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov