Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jEIKA-0001Jl-4d for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2020 19:56:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jEIK7-0002HT-R4 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2020 19:56:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jEIK7-0002HM-Em for pgsql-hackers@lists.postgresql.org; Tue, 17 Mar 2020 19:56:23 +0000 Received: from mail-qv1-xf42.google.com ([2607:f8b0:4864:20::f42]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jEIK4-0006A9-9h for pgsql-hackers@lists.postgresql.org; Tue, 17 Mar 2020 19:56:21 +0000 Received: by mail-qv1-xf42.google.com with SMTP id a10so11596705qvq.8 for ; Tue, 17 Mar 2020 12:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nDwF9BC4fOCmrFVlPEq3lxm5klPQxtKEYadg/HJUCTI=; b=JBdZBHUvijvmsT0M+v8uRhHDuW3bG4tm7e+A0Rt5CRc+Iw6fLkKrCvZA9YVbERhTkW 0DIhvIxeefAf3YZEgMFl/DjIBhNBZDyZRTVza1U2PbiW2910SQ6Xl2fWC4D04uS9kkJd iQAaqRPN37nU4eavyDIdusfL6pNSYzVQxyJWfIZrLrbQZuFQDV3Yod2PWekKJ7GP5Z4P 09EdFFMRsQY721StOfMdvXW+yLJqKKdEb6WiZTwzQ9YKM7yZYLEJ2IHZHRdQ7AmLImFw 3/aADCLCdywFt1dbAoUHAPQVQ6CViV+XyYMA6QTEeuesQh4XdK1zOgwo61kUCof3s6Sa 1i6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nDwF9BC4fOCmrFVlPEq3lxm5klPQxtKEYadg/HJUCTI=; b=gdk8KyCNpTHhts9iwhK5h5SnhpT689CaZlCSD9RJEsge2nETpEgVY9YueeBhTmBooD qMcyOdaf+y5Wpld+CEHhK40ZeQ6YWcF9pXa8u/eAQVdSwfcZcUnBKAbJYy50cQmqwuET lpt9k/J+8DS5hAX0D409redMfkuEMJ/cUbAzYRmfEHZeMAToUQAj5mGery43pblWJjSP vooSZ1pV+RScpXkNh2TG5W/8NTXpDRJYx9N3Kwil5/MglWXsno0LLvblbKERn47ZLZ7A hcI/mxBIHSd5u1DMTRIvVvJ9hLGi91ifgVAEhbm1+rXqIkFwvCD/X1abxhIB35UynaDE KTHw== X-Gm-Message-State: ANhLgQ2Sv9UUwzH1Ze2L0+EpPfwEcw9CUB0/fWUu2T6LwYuE+HYEp3zA eL2dxd8YJ0xmQslOW+HB7O7sEA== X-Google-Smtp-Source: ADFU+vufF/okHZM8GOGhFPsZ4LBsgOluNrE/RLfVWGNIqIeyMoIyxq3EmhFnMHwo9BJHp5rvKQcJuQ== X-Received: by 2002:ad4:51cb:: with SMTP id p11mr816980qvq.210.1584474979163; Tue, 17 Mar 2020 12:56:19 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id u51sm3143841qth.46.2020.03.17.12.56.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2020 12:56:18 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id BE486800CF1; Tue, 17 Mar 2020 14:56:16 -0500 (CDT) Date: Tue, 17 Mar 2020 14:56:16 -0500 From: Justin Pryzby To: Laurenz Albe Cc: Andres Freund , Masahiko Sawada , David Rowley , Tomas Vondra , Amit Kapila , Masahiko Sawada , Darafei =?utf-8?Q?Kom=D1=8Fpa?= Praliaskouski , pgsql-hackers@lists.postgresql.org, Alvaro Herrera , Michael Banck Subject: Re: Berserk Autovacuum (let's save next Mandrill) Message-ID: <20200317195616.GZ26184@telsasoft.com> References: <20200316124713.GH26184@telsasoft.com> <9c9b7d19d17ad5e4e0ee10b8426fa1b78dd24c0a.camel@cybertec.at> <20200316201315.dgkeedl6rp2wdjje@alap3.anarazel.de> <19be41199e7b303bbecc1066bd9f011d95882aa8.camel@cybertec.at> <20200316213459.kh6xln3z35hgjodd@alap3.anarazel.de> <7c132215f0e947af7d9ccb7a340ad6e81b369c24.camel@cybertec.at> <20200317152409.GW26184@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Mar 17, 2020 at 08:42:07PM +0100, Laurenz Albe wrote: > Also, since aggressive^H^H^H^H^H^H^H^H^H^Hproactive freezing seems to be a > performance problem in some cases (pages with UPDATEs and DELETEs in otherwise > INSERT-mostly tables), I have done away with the whole freezing thing, > which made the whole patch much smaller and simpler. > > Now all that is introduced are the threshold and scale factor and > the new statistics counter to track the number of inserts since the last > VACUUM. > > Updated patch attached. > > Perhaps we can reach a consensus on this reduced functionality. +1 I still suggest scale_factor maximum of 1e10, like 4d54543efa5eb074ead4d0fadb2af4161c943044 Which alows more effectively disabling it than a factor of 100, which would progress like: ~1, 1e2, 1e4, 1e6, 1e8, 1e10, .. I don't think that 1e4 would be a problem, but 1e6 and 1e8 could be. With 1e10, it's first vacuumed when there's 10billion inserts, if we didn't previous hit the n_dead threshold. I think that's ok? If one wanted to disable it up to 1e11 tuples, I think they'd disable autovacuum, or preferably just implement an vacuum job. The commit message says: |The scale factor defaults to 0, which means that it is |effectively disabled, but it offers some flexibility ..but "it" is ambiguous, so should say something like: "the table size does not contribute to the autovacuum threshold". -- Justin