Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o6djt-0004tw-Sk for pgsql-performance@arkaria.postgresql.org; Wed, 29 Jun 2022 19:52:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o6djs-0007sN-Oz for pgsql-performance@arkaria.postgresql.org; Wed, 29 Jun 2022 19:52:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o6djs-0007s5-Ce for pgsql-performance@lists.postgresql.org; Wed, 29 Jun 2022 19:52:40 +0000 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o6djo-0001X4-5y for pgsql-performance@postgresql.org; Wed, 29 Jun 2022 19:52:39 +0000 Received: by mail-qv1-xf34.google.com with SMTP id u14so23819506qvv.2 for ; Wed, 29 Jun 2022 12:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5V54c3H3HZvNoVh+ezgsfFhvbCRAFr2NipWFkGy62Fc=; b=os45ogfGisQU8ThxsyBduJF/R4oB9mH77SDB5B9QNvmanvIit6pWrHGkbw3jrJdPgm XD4jk5Fa3o4u66W56/V0aFH4DB48s0P7u3pX1jr1kSY2Xp6bAIDv6dZctMUj+9D7HBgT n74aiX4GwS4FG0ea0V3EVbgtzXvuKtISQByx0i8QBMR+jRhDBllM1mA85WhI7Sf6w1eb uGe/WGJ9wfZQFu7VUX/rz4ycma/YuUMfDJWc8OlWOy8afwUTmotj4fx0AVf94F5z88CP 6uiN/irjui4hXXD/ljl9QDeO1F9bvaPFY7fFc4wSSAyva2+FkcMuNj79grpUt0weF7p/ IHSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5V54c3H3HZvNoVh+ezgsfFhvbCRAFr2NipWFkGy62Fc=; b=CGn7ZbFt16nVSblZEREpDXBiztO7rKdGByUHUcj7bqJsGrw5ax2I2kP1UJV5h5uf91 t9DBwWVkITQPfsAtWTps/FHcLJ43xtLTY3lewF0dichUyItMk3xXYitWdGVm3shoUI4n jrgY2CHT7AZJIXkelHNa0xd3bQPwqXGf9lwjnz+WHX3FfhFytaRT6RfC76lP3DOGsBQs DJlGNlM7CKV/D1A0XtEIjH81KKHmc0LQc5gL6tJPbZDV4e53GXrEb29rcpEQjEiW0AzQ QIAUlaWtITbfqjEyydM7OVZn3xjxY175N1GmNh0F8uR59hLmoFPzojJ45J/FH8JBWbTQ Hc7w== X-Gm-Message-State: AJIora+6PkaZyc3JtHrkqrACiZHVaSeHLwrNb32ityjMZHZF8Auo6qor 44ou4ikPSVPFxcEWWsB8mYOsLTu5I2SRaQ== X-Google-Smtp-Source: AGRyM1sAq6eVN/de4A0bJqfK4jviXoNlyvJ+FxkH+BHiAg6XW17K4FQ4dS8QPGlGeDuRScxdE7SKJQ== X-Received: by 2002:a05:622a:58e:b0:317:c840:de91 with SMTP id c14-20020a05622a058e00b00317c840de91mr4168453qtb.245.1656532355120; Wed, 29 Jun 2022 12:52:35 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id h5-20020ac85845000000b0031a4c717413sm7054443qth.61.2022.06.29.12.52.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Jun 2022 12:52:34 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 84D2F800785; Wed, 29 Jun 2022 14:52:33 -0500 (CDT) Date: Wed, 29 Jun 2022 14:52:33 -0500 From: Justin Pryzby To: Mikkel Lauritsen Cc: pgsql-performance@postgresql.org Subject: Re: Fluctuating performance of updates on small table with trigger Message-ID: <20220629195233.GR28130@telsasoft.com> References: <4a925ad4ebb17849054ef947475e618b@tala.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4a925ad4ebb17849054ef947475e618b@tala.dk> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jun 29, 2022 at 09:31:58PM +0200, Mikkel Lauritsen wrote: > In short I'm running PostgreSQL 14.1 on Linux on a small test machine with should try to upgrade to 14.4, for $reasons > Is there any feasible way to find out what it is that causes Postgres to > start doing slow updates? My guess would be a buffer filling up or something > similar, but the regularity between runs paired with the irregular lengths > of the fast and slow phases in each run doesn't really seem to fit with > this. Set log_checkpoints=on, log_autovacuum_min_duration=0, log_lock_waits=on, and enable autoexplain with auto_explain.log_nested_statements=on. Then see what's in the logs when that happens. @hackers: the first two of those are enabled by default in 15dev, and this inquiry seems to support that change. -- Justin