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 1jEaNq-0004LF-PW for pgsql-general@arkaria.postgresql.org; Wed, 18 Mar 2020 15:13:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jEaNo-0003nz-B6 for pgsql-general@arkaria.postgresql.org; Wed, 18 Mar 2020 15:13:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jEaNm-0003ns-Jm for pgsql-general@lists.postgresql.org; Wed, 18 Mar 2020 15:13:24 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jEaNi-0002fB-JV for pgsql-general@postgresql.org; Wed, 18 Mar 2020 15:13:21 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C03BA5C024D; Wed, 18 Mar 2020 11:13:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 18 Mar 2020 11:13:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=I CcOX5SjK+nhMhcFzow+P3uEpF3u/UwM2HetyZ1QOo0=; b=Llyxqs3pe5k1VqkDH XuaazCp0BdFkOQp6R/mOZybaOjGCRbltICXgg8I6R4ch1bxiu4R0ivcye0AtncPa br2Imq44XnAbSacVVVegtyHVwyIq+kP4XIB6ouKNk1PyY7e4TxCrjQi7O0viHHyp JL6w2Dcl4bIhbrvKvObgZEeiiJgxIPE1GtHtmUi8wtIa8x2Pd0ndiP6sYAjG4sZo 6z80QhRuDYFDiR3/1kwUT3ZDMSRu5ML2moOFOAT4cUi7DTGDZw/myzthvHzO/5+p kFUQjGOUwToNKwkca4w9BWlNWUvejIVfbSW4DW8foYlygPzhJk/cvGpTWkSBvXH/ Z5v9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=ICcOX5SjK+nhMhcFzow+P3uEpF3u/UwM2HetyZ1QO o0=; b=NuXuDFbPlmXBUGZR5WjXoDigwmG8kR7oF1/WmzswFEbLDEp7QoZhHmxgw RblPQ34kxDxuOnpKhv3qjoPA3pe3DDZasLfMK4gOoxw3vQH0G9/HAXnWCLppDo+O eRe9jKarl1qSF0uvg1jLc4e8rflVOxmb6fSxKCNE9+IkxYJxsFmADHtj+VAWbN5g pEpjHecCLmB8hg0Eew7YijwmNYP+MdJXcvMY/yPJCY43Rnns4YbGCgcbYQo0kwA5 JS+/Q5j+Wyo9W7nA5dz7iZ3K5QfS7xrwFvfAJqPpzZ9k4aXmTVSI0m17HSYj+tIe NdvqE4pTKa/7rfy+Kdj5r8sJ4joCw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudefjedgjedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucfkphepjedurddvuddvrdduvdelrdduleefnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklh grvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.10] (unknown [71.212.129.193]) by mail.messagingengine.com (Postfix) with ESMTPA id 12DFE3280063; Wed, 18 Mar 2020 11:13:14 -0400 (EDT) Subject: Re: Fwd: PG12 autovac issues To: Justin King References: <1887ede9-c40f-88a7-1823-07a5da7dc600@aklaver.com> Cc: pgsql-general From: Adrian Klaver Message-ID: Date: Wed, 18 Mar 2020 08:13:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/18/20 6:57 AM, Justin King wrote: Please reply to list also Ccing list >>> Here are the settings, these are the only ones that are not set to >>> default with the exception of a few tables that have been overridden >>> with a different value due to lots of updates and few rows: >> >> And those values are? > > Thanks for the response, hopefully this will help: The below is helpful, but what I was referring to above was the settings for the overridden tables. > > postgres=# select name,setting from pg_settings where name like '%vacuum%'; > name = setting > autovacuum = on > autovacuum_analyze_scale_factor = 0.1 > autovacuum_analyze_threshold = 2500 > autovacuum_freeze_max_age = 200000000 > autovacuum_max_workers = 8 > autovacuum_multixact_freeze_max_age = 400000000 > autovacuum_naptime = 15 > autovacuum_vacuum_cost_delay = 20 > autovacuum_vacuum_cost_limit = -1 > autovacuum_vacuum_scale_factor = 0.2 > autovacuum_vacuum_threshold = 500 > autovacuum_work_mem = -1 > log_autovacuum_min_duration = 0 > vacuum_cleanup_index_scale_factor = 0.1 > vacuum_cost_delay = 0 > vacuum_cost_limit = 1000 > vacuum_cost_page_dirty = 20 > vacuum_cost_page_hit = 1 > vacuum_cost_page_miss = 10 > vacuum_defer_cleanup_age = 0 > vacuum_freeze_min_age = 50000000 > vacuum_freeze_table_age = 150000000 > vacuum_multixact_freeze_min_age = 5000000 > vacuum_multixact_freeze_table_age = 150000000 > >> >> More below. >> >>> >>> autovacuum = on >>> log_autovacuum_min_duration = 0 >>> autovacuum_max_workers = 8 >>> autovacuum_naptime = 15s >>> autovacuum_vacuum_threshold = 500 >>> autovacuum_analyze_threshold = 2500 >>> vacuum_cost_limit = 1000 >> >> Are either of the below set > 0?: >> >> vacuum_cost_delay >> >> autovacuum_vacuum_cost_delay >> >>> >>> We want fairly aggressive autovacs to keep table bloat limited -- the >>> application latency suffers if it has to wade through dead tuples and >>> staying near realtime is important in our environment. >>> >>> ** Also, it should be noted that the autovacuum_analyze_threshold is >>> probably an incorrect value, we likely intended that to be 250 and >>> just have now realized it after poking more at the configuration. >>> >>>> >> >> >> >> -- >> Adrian Klaver >> adrian.klaver@aklaver.com -- Adrian Klaver adrian.klaver@aklaver.com