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 1tfeyU-0044W9-QT for pgsql-general@arkaria.postgresql.org; Wed, 05 Feb 2025 12:57:51 +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 1tfeyT-00ETNl-Tf for pgsql-general@arkaria.postgresql.org; Wed, 05 Feb 2025 12:57:49 +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 1tfeyT-00ETNd-JU for pgsql-general@lists.postgresql.org; Wed, 05 Feb 2025 12:57:49 +0000 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tfeyR-003JUN-0b for pgsql-general@lists.postgresql.org; Wed, 05 Feb 2025 12:57:48 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 62F18443AB; Wed, 5 Feb 2025 12:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vondra.me; s=gm1; t=1738760264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=96nCRCdXbqHtnf2N6MTdrODU8VlZdVNZI0jDiUkDOXE=; b=KdJ1umhOYhrHEumHHFsDYI69nd97j2uyeRqtG4+JoGvohmUoR53cxISwtRRMEP8VPfaWGM 32YJfxQZYmvQb+hoQ1mEVlmUKJY9NiA6KxyE6MgPbrtaBjxX4ZU2o9roJ5Q9gtz9l1Br3p 6DnaBzDWuiftW0SKNEbi43Jgy2t4s1owo951m2l+E+yX5ui/rVh8o4IwlJfDOIk3RYxaYw Un22CmXhfdHgy3TOhnAPqWgYvYYOqm8YsQW85dpa6CnWu69uzazgOjlyH+vHVQ3b77KMPA PUTUKmUBxEjtNqYSZSRKP9EvYGqQqXe4yM0zdlgpk2V0KEloshUwVaxDlaT19Q== Message-ID: <637513a7-04b8-4ae1-aece-052106beeeee@vondra.me> Date: Wed, 5 Feb 2025 13:57:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Commit Latency To: Ramakrishna m , pgsql-general@lists.postgresql.org Cc: ravisql09@gmail.com References: Content-Language: en-US From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-State: clean X-GND-Score: 0 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvfeehudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepvfhomhgrshcugghonhgurhgruceothhomhgrshesvhhonhgurhgrrdhmvgeqnecuggftrfgrthhtvghrnhepuedvvdeifefffeekudeggfdtieeglefggeduheffveeihefggfehgfdvudetffevnecukfhppeekiedrgeelrddvfeeirdduleefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepkeeirdegledrvdefiedrudelfedphhgvlhhopegluddtrddufeejrddtrddvngdpmhgrihhlfhhrohhmpehtohhmrghssehvohhnughrrgdrmhgvpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheprhgrmhdrphhguggssehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtoheprhgrvhhishhqlhdtleesghhmrghilhdrtghomh X-GND-Sasl: tomas@vondra.me List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I think the first thing you should do is verify the performance of the storage, particularly how long it takes to do fsync. You didn't explain what kind of storage or filesystem you're using, so hard to say. It's not clear to me what "resource usage" means exactly, but the fsync may be slow even when nothing else competes for I/O. regards Tomas On 2/5/25 11:18, Ramakrishna m wrote: > HI  Team, > I have a system handling *300 TPS*, with resource usage *below 10%*. > However, I’m noticing *commit latency of around 200ms* for *1% of > transactions*, occasionally spiking to *1 second*. Since there is no > significant *I/O pressure*, I’m trying to identify what else might be > causing this in *PostgreSQL 16*.   > > Below are the parameters, Version and OS details. > > image.png > > Regards, > Ram. -- Tomas Vondra