From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 24 Aug 2018 11:31:26 +0300 From: Vladimir Davydov Subject: Re: [PATCH 11/18] vinyl: use snap_io_rate_limit for initial dump bandwidth estimate Message-ID: <20180824083126.6wjnwkokmyty7fj2@esperanza> References: <111debb195d9c9780edef15d311ea94282a4fd60.1534432819.git.vdavydov.dev@gmail.com> <20180820112431.GN8716@chai> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180820112431.GN8716@chai> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Mon, Aug 20, 2018 at 02:24:31PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [18/08/16 23:03]: > > The user can limit dump bandwidth with box.cfg.snap_io_rate_limit to a > > value, which is less than the current estimate. To avoid stalls caused > > by overestimating dump bandwidth, we must take into account the limit > > for the initial guess and forget all observations whenever it changes. > > > void > > +vy_quota_reset_dump_bw(struct vy_quota *q, size_t max) > > +{ > > + histogram_reset(q->dump_bw_hist); > > + q->dump_bw = MIN(VY_DEFAULT_DUMP_BANDWIDTH, max); > > +} > > + > > This sounds like vy_quota_set_dump_bw to me, not reset(). I think it's rather 'reset', because it forgets all measurements that have been observed so far.