Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srBzi-00G0NF-LF for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Sep 2024 07:54:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1srBzh-006DTM-Bi for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Sep 2024 07:54:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srBzh-006DS7-24 for pgsql-hackers@lists.postgresql.org; Thu, 19 Sep 2024 07:54:29 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1srBzd-001w85-UQ for pgsql-hackers@lists.postgresql.org; Thu, 19 Sep 2024 07:54:27 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42cbc38a997so3265005e9.1 for ; Thu, 19 Sep 2024 00:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726732464; x=1727337264; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MmT+KIiSHjzp8H+ra48O3ZPJKRE7W0XDyqisrYp26HE=; b=eGk2OJT46Z4fjC9rQBlnbeaYyUge+NsVt3XFu6eHPtQROufHzkaKTa7WS8L83eEahL mUqZ3gld6L2I6fWL5EqL/siD+eHp3jZKYaTVQIl5D8Dve7q7V3QSlahZ1GS+p3FUHv3t SCz3tLjwCXy8f1UnBwof4OQH4sujZJ9hJSP42hz3pcvsvN2cbX5viOQxgDj8GsJZSklo qD3krwSDvQcH8VV3zWZjE0qfIQPx4mLMFHDq1M6eVD1/jJS93FsyJj8PxY4sYZEzat/z PPT7IM4zqVp9MQXyNs/512i0WKP+HYVuAC5k0OHsKPSnHL3DsqCLAnSmCcm0/K+upoXi DbUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726732464; x=1727337264; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MmT+KIiSHjzp8H+ra48O3ZPJKRE7W0XDyqisrYp26HE=; b=o8v1ZXs41mCQ8eUbSWmQvPgYHah1j30huXqI77wlpI6CwchsyqsvyJa2+UwTgNfvhh GKG+vUmmLYTD3Rlb5jWnSKn2P8RZOqEOSubSPX0QdDT8u9QtQuX9QJZkMS1/a1ON8QOi XlQFNpXlofWixBmIkk5ibeeFDQatMgdCFfeooxO0MzzRflmFzNDSOwruV2YJ10HFPwDI NKbxB/uTBRkk+6aRABxDI6Ae0Wha9AqPWQGIDGUg1XP8YumEM2GL3RZ2LdsXnPI8xbLk DiNjFaNo/ZJFu9STPLJVeFa41OOycDRUZChlyEDz5lyeAJI+3lfvhYBnUH4mb98mo/0v ndPA== X-Forwarded-Encrypted: i=1; AJvYcCXY7tmrxnUe5YOqTm5nNvMi/Jd0bXEjegWBIxeXp9NF4ACrQ0fQippeu6TDi2d8IxAeXh4zcLNM1iCC+PSl@lists.postgresql.org X-Gm-Message-State: AOJu0Yzchy4aRYHVvSnvTWIgYcMswzARNniCXwe9qRP51hzXY7ULiei1 dRUg4vguIrIN/6QN7v9XFFm/LcatBUJZQVSl+CyvXl8QUohVXzMU X-Google-Smtp-Source: AGHT+IGoaNMEXY2sRm9aU4H0kRvM7mefiNtcU7AUAZ+A49/NzmzoyE2LeU3pfCOUtsHCtVlLXqDbig== X-Received: by 2002:a05:600c:4f49:b0:42c:b98d:b993 with SMTP id 5b1f17b1804b1-42e743f8739mr12326085e9.2.1726732464052; Thu, 19 Sep 2024 00:54:24 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-236-134-5.eu-west-3.compute.amazonaws.com. [15.236.134.5]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e75450ec6sm14896345e9.21.2024.09.19.00.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2024 00:54:23 -0700 (PDT) Date: Thu, 19 Sep 2024 07:54:21 +0000 From: Bertrand Drouvot To: Nathan Bossart Cc: "Imseih (AWS), Sami" , Masahiko Sawada , "pgsql-hackers@lists.postgresql.org" , Robert Haas Subject: Re: Track the amount of time waiting due to cost_delay Message-ID: References: <42B4800A-D8D0-4734-930A-4D94D0EA90C7@amazon.com> <8D4DC535-1C51-44A9-ABDD-420F975AE8A9@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Wed, Sep 18, 2024 at 04:04:53PM -0500, Nathan Bossart wrote: > On Thu, Sep 05, 2024 at 04:59:54AM +0000, Bertrand Drouvot wrote: > > Please find attached v6, a mandatory rebase due to catversion bump conflict. > > I'm removing the catversion bump from the patch as it generates too frequent > > conflicts (just mention it needs to be done in the commit message). > > v6 looks generally reasonable to me. Thanks for looking at it! > I think the > nap_time_since_last_report variable needs to be marked static, though. Agree. > One thing that occurs to me is that this information may not be > particularly useful when parallel workers are used. Without parallelism, > it's easy enough to figure out the percentage of time that your VACUUM is > spending asleep, but when there are parallel workers, it may be hard to > deduce much of anything from the value. I think that if the number of parallel workers being used are the same across runs then one can measure "accurately" the impact of some changes (set vacuum_cost_delay=... for example) on the delay. Without the patch one could just guess as many others factors could impact the vacuum duration (load on the system, i/o latency,...). Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com