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 1oGzzE-0003bJ-6p for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Jul 2022 09:39:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oGzzD-00052P-1A for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Jul 2022 09:39:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oGzzC-00052G-Nv for pgsql-hackers@lists.postgresql.org; Thu, 28 Jul 2022 09:39:18 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oGzzA-0004Id-N8 for pgsql-hackers@lists.postgresql.org; Thu, 28 Jul 2022 09:39:18 +0000 Received: by mail-ed1-x529.google.com with SMTP id z18so1434807edb.10 for ; Thu, 28 Jul 2022 02:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qpe9YYlOuuHBb74oURD9MPHn69GEXSPcpaKBXDmkZmc=; b=b2ofD+s+OczbU97psvhXHMRSYhJkx4pWAptDa8KDkwFyxJ8SEJUNdspk9T/44wPqOp Ddmj4gLRP+r50cPETkq9B/C20ch8ms3cOxEaFUYQT8jTdZS9DB9h+mUUKhA8upjukNz5 XMS9xSplXYQuItaHwl3bXtNzfueuTIfYoNecxg008a52Hs8DIdp9ggSY95/xOxkSEfGz 9SwNmh2Bfl92swZ1vMh6SRmc0tJmDMcQVrjOiBSXjmY5X/yUszpj2vp/bTxkLJs6ZKCd KHk2H23oox+1y/YoS0mxpUXH9D/2IU6wgc+qzSyzarrn4PAw4vKXabsS9SddmqFT5p/p 1Tig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qpe9YYlOuuHBb74oURD9MPHn69GEXSPcpaKBXDmkZmc=; b=R/8UUpLLrK/HjN2Fq5hPDL+k19m28FXQX31Oyv3vcROLxBjUVBT5plrtc5WqY/BufI JuwbHnK85qXuHpxnSDKZTYpUPADEyRjQIFq23S6LcLVB3OK9htTjPXrZN1YgbwTau1uz BzqAd+pgCBvch60+L1wPLWEfxQAHrqSWiI70IBCTslnHsqyTVs01kS/H57k6Sq38NrkO lFN3Q/iqK+l8U5XZ/rMA1pPO8NTtO5+9j6aIGCZWMzZLy8qNCd2IxL7Is0RsGMHCUILk lg0J7VzEbldA5y9FgLxl2CwLdhFqBkIUNCIuSEFgUDjh3xjIE1mno0KYQezhQ0IJ1Usy Gd0Q== X-Gm-Message-State: AJIora8HJTv+xjKb3BcYCrEjajm35AH0izidXEfkzyd+Gm39lyGcQN9S KNxJ6WRcSwT6+c6I/VUT470cfKH4yybIK+BqxY0= X-Google-Smtp-Source: AGRyM1tXdDaxNsrw3BSu3qNVM2F1S32HGEB8jpkzpE1iq74fh7OQVOF6pqUlHGs3hJnw1POzJNF9qm5K+7gb+d1LJYM= X-Received: by 2002:a05:6402:2788:b0:43a:e0aa:97f4 with SMTP id b8-20020a056402278800b0043ae0aa97f4mr26176007ede.329.1659001155294; Thu, 28 Jul 2022 02:39:15 -0700 (PDT) MIME-Version: 1.0 References: <20220319001556.atuqbmafvc73pa2k@alap3.anarazel.de> <20220707000446.hefgyu5xikxwt4md@alap3.anarazel.de> In-Reply-To: <20220707000446.hefgyu5xikxwt4md@alap3.anarazel.de> From: Nitin Jadhav Date: Thu, 28 Jul 2022 15:08:38 +0530 Message-ID: Subject: Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) To: Andres Freund Cc: Bharath Rupireddy , Matthias van de Meent , Ashutosh Sharma , Julien Rouhaud , Bruce Momjian , Tom Lane , Magnus Hagander , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > > To understand the performance effects of the above, I have taken the > > average of five checkpoints with the patch and without the patch in my > > environment. Here are the results. > > With patch: 269.65 s > > Without patch: 269.60 s > > Those look like timed checkpoints - if the checkpoints are sleeping a > part of the time, you're not going to see any potential overhead. Yes. The above data is collected from timed checkpoints. create table t1(a int); insert into t1 select * from generate_series(1,10000000); I generated a lot of data by using the above queries which would in turn trigger the checkpoint (wal). --- > To see whether this has an effect you'd have to make sure there's a > certain number of dirty buffers (e.g. by doing CREATE TABLE AS > some_query) and then do a manual checkpoint and time how long that > times. For this case I have generated data by using below queries. create table t1(a int); insert into t1 select * from generate_series(1,8000000); This does not trigger the checkpoint automatically. I have issued the CHECKPOINT manually and measured the performance by considering an average of 5 checkpoints. Here are the details. With patch: 2.457 s Without patch: 2.334 s Please share your thoughts. Thanks & Regards, Nitin Jadhav On Thu, Jul 7, 2022 at 5:34 AM Andres Freund wrote: > > Hi, > > On 2022-06-13 19:08:35 +0530, Nitin Jadhav wrote: > > > Have you measured the performance effects of this? On fast storage with large > > > shared_buffers I've seen these loops in profiles. It's probably fine, but it'd > > > be good to verify that. > > > > To understand the performance effects of the above, I have taken the > > average of five checkpoints with the patch and without the patch in my > > environment. Here are the results. > > With patch: 269.65 s > > Without patch: 269.60 s > > Those look like timed checkpoints - if the checkpoints are sleeping a > part of the time, you're not going to see any potential overhead. > > To see whether this has an effect you'd have to make sure there's a > certain number of dirty buffers (e.g. by doing CREATE TABLE AS > some_query) and then do a manual checkpoint and time how long that > times. > > Greetings, > > Andres Freund