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 1tzaG1-003smy-Ua for pgsql-general@arkaria.postgresql.org; Tue, 01 Apr 2025 11:58:18 +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 1tzaG0-001L51-Lp for pgsql-general@arkaria.postgresql.org; Tue, 01 Apr 2025 11:58:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tzIzm-009PkJ-1F for pgsql-general@lists.postgresql.org; Mon, 31 Mar 2025 17:32:22 +0000 Received: from mail-vi1eur03on2104.outbound.protection.outlook.com ([40.107.103.104] helo=EUR03-VI1-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tzIzj-002Glb-1q for pgsql-general@lists.postgresql.org; Mon, 31 Mar 2025 17:32:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CYA0cFS2Ib9UuBSXsyvXBuMwc0Glv2KJskgHfXygKMD3kAzldupiDALV4BYvQleYx1j5Itd2qkbmRGtk0oW8jqYwdOYKuZpcX89rjNY7hTGB90ar4dmjYD6rzYmi/88M/Uv0eLmIrFHaKmfhBxyEeSKV8hFlEdjC6ZQX3f51d5eVl8M4PDbULPhPpI6gG2bUn0UfTufyqRybyepUmdbV3rBXaKEV6OxJYo7dLnWX1nEzFo0YBQ7sNAOeh0DYH2AhKkDYjIfjt4wKiRRg+U7mtD+nm9rIQ64r3c+RNEKWS0ynJfiXs8NrTMszE9OfNRD1rx6btGeFhAWIdtSQoGkS7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3j7cG8LnOQsCcitSUe0NSLeXzC2cy7XT0P9ytw844D8=; b=eq/uA7mn8UWPMPatEl0dc54XJP1NaYJBlhf0FAw0dCPxbwkTq5QIadJombMOTd82zCm6E6TDqaWovsUbjfnV4VbvvAEB7kQbBtiTzka35cBJtyeHuRJtDYtCYXNKXXDGXTLTBm9chaubd9V6K89jNlTnO1dux/o6SZ2sVMkuIkkHlWwcfwq8LtIuqnCDYGJVC6ITL1Tii/6umL29QMZ7o8qTZ6KdKXhfc1vJZUlGdiOmIIVs1uqsfrIkQFo2Ax1ra9zytvipdvmzPqq5Hvvxec56X4HUM8updiXV6nP/4BrY/ObSgmZ557rz1bmSiYhrAiZsQPB1yq9AbssCCAP/qQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=legitsecurity.com; dmarc=pass action=none header.from=legitsecurity.com; dkim=pass header.d=legitsecurity.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=legitsecurity.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3j7cG8LnOQsCcitSUe0NSLeXzC2cy7XT0P9ytw844D8=; b=FDDdQUIA8fINxRy9fLS7rHQCieBvEevSndgV46hK5rWajbIGWf2L0DNFzem1IyU4MibMOUAyjjzgk/fgjBMqCAy9nKH2ihlbM6uqxi0eBTiMEeiYGFnqFd05oIlfw4MlN6JvWjwQSybx9FrnoVFIcpLtjg35au98ctUL+JFKqEPwMOhvHPgLub8W/HcPM0r064m+GyPmslNx4hnxnIhe+mo+UBx5/Q59dIAK1rPK7aJg7+m7JU4LsW9Bh4AwSbkIZ5Y8W+9GTwzyaj7FVLvGuU/K981Gt369MnL96up95+K/SyjuspVjEJkpPqiv0vOUwEV1Sej9fdTu8dpRw4AZwA== Received: from PA6PR03MB10241.eurprd03.prod.outlook.com (2603:10a6:102:3c8::16) by AS8PR03MB10038.eurprd03.prod.outlook.com (2603:10a6:20b:631::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8534.44; Mon, 31 Mar 2025 17:32:16 +0000 Received: from PA6PR03MB10241.eurprd03.prod.outlook.com ([fe80::1a70:b2d2:cabe:35a6]) by PA6PR03MB10241.eurprd03.prod.outlook.com ([fe80::1a70:b2d2:cabe:35a6%4]) with mapi id 15.20.8534.043; Mon, 31 Mar 2025 17:32:15 +0000 From: Eden Aharoni To: Christophe Pettus CC: "pgsql-general@lists.postgresql.org" Subject: Re: [EXTERNAL] Re: RDS IO Read time Thread-Topic: [EXTERNAL] Re: RDS IO Read time Thread-Index: AQHbokLzWKEJygYLh0CXroqg3FB1SrONWv+AgAAkT5U= Date: Mon, 31 Mar 2025 17:32:15 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-reactions: allow authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=legitsecurity.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PA6PR03MB10241:EE_|AS8PR03MB10038:EE_ x-ms-office365-filtering-correlation-id: d5dc6129-b884-492d-1a5b-08dd7079facf x-ms-exchange-atpmessageproperties: SA x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|366016|376014|8096899003|38070700018|7053199007|13003099007; x-microsoft-antispam-message-info: =?Windows-1252?Q?TugzT0gij7YzaEBkXYmZ5UEXTVCLHhgnWc+2s/O+PyWLLX/xSMnxcVHG?= =?Windows-1252?Q?+VbFgWYI27UvtABHRHX82XiBDQSGawNMoWHSEbDRztpkwjEZ5FJuLcck?= =?Windows-1252?Q?OFIQ2uzSMCyLDJAcAnKZxB3JxrlkSGstHDNoeD2JSiXHji96CAIM0l6l?= =?Windows-1252?Q?EMXXkg27Z9cN//NY1oEjOCFwssKcB0wpmV1IVDkJTng14htL3m4Xvm4y?= =?Windows-1252?Q?AjAI+8R6qXGAO6/Lf4I6BDyawelAhj7Dw8O76+Iz5o8QuJG6q2ZqFJNG?= =?Windows-1252?Q?uRGrJxZOI39//S3hhSHnZajoiK8k45Phk+Z3IwmVlaaLz5z85ys+LEAf?= =?Windows-1252?Q?ZyV1bgAXdnpd5TevrXNQZ+xv37Wknx7sKy9gofVjgDfhXtjJVbtAn6dQ?= =?Windows-1252?Q?dNb+bZlh2b74PW4+FdcaPoou2LuMfPZmaCNpl69t9lWK5M752zZnWLFF?= =?Windows-1252?Q?LOwYf706zNFqYQehn4bBpiC9KiN6H6d9IweJXKD8kTZma2eRu/Upn1vz?= =?Windows-1252?Q?7S2Onvqr6rjYeasQuCNcMVVTYn29pm8MHZDwNWBNwV/T2sOVx90o0L7a?= =?Windows-1252?Q?Go+/R0V3ijebRAxLlLZRv0R2B6bXM1Nz2P4uKg4zCmxVPV5dnBCRE5Eo?= =?Windows-1252?Q?iRj2+/UbB1ovdYt76oTCLBfz3vyqv+efoucD9kweCcnCfG8gBzrY6faZ?= =?Windows-1252?Q?gddzAs7d1oZF8C7ZJdVUyL8+wHlmQMBylrLN9I4fOLa+clxXG55U3SMN?= =?Windows-1252?Q?xpLPMpyDkFvwTChCpH4zWTJx40rRIz6T4ZHL5LZDvPUPaEzhhM2BxSQ7?= =?Windows-1252?Q?sRHf6TzRkkT/2Gb/lCblYljDcSfyb5THKW686cc4yo/jQXlfDbA1TYP8?= =?Windows-1252?Q?58hTVtmIUh3l6A4zO4KdEa8WFGRwJ9Migth/41ExXrUgRUpWILvYn8Zd?= =?Windows-1252?Q?ffhqCXez/nCdjQlsUAdOqPNaDSOTTtVI8cDwDXzIyCB2Q/xN1aRgojx+?= =?Windows-1252?Q?I70IYZf0vvyniGUhmqmEj1q/6zvI5g6M15qDjGlMgpBm/dWw+Q+/D+Dq?= =?Windows-1252?Q?QeiL7MLhdXLVCF54ym4NgP2DJRaWfQcOQ5GKFTfcyGZss7Bymf70FjsC?= =?Windows-1252?Q?owmZ0Va4l5OFAWnmbzlsRQ3RIzwOGIEHm47Z97efllmrU8Rk4ciLN+qJ?= =?Windows-1252?Q?b7cNVyXv+n11LnOBAurCkgNZG9pcwUmv56mFuQWM+L4R19ou683HnId7?= =?Windows-1252?Q?sYeVJgb2uwPitLjJFuEhrePsaYdWYXLoZ/EpSMlpEYyz/c9OQ5LcaFhN?= =?Windows-1252?Q?BrNEdQn5SKdmmkx1do7Ln43MtiBujh4QnfrOPsKZCEtbiLwXNv+lkvM5?= =?Windows-1252?Q?kZUlAu7YJ2rAVxpEM3BtN5aHEsJVNMs4U1ogldGiYpykeb+Khs/SQDr4?= =?Windows-1252?Q?whfz2FGdi0dvTKBkjfZBkP+u3QWC/rl/4NRXXt6I3eEScBAK444LWBnQ?= =?Windows-1252?Q?BCljaC0y?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA6PR03MB10241.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(8096899003)(38070700018)(7053199007)(13003099007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?TuceEKRLqYq22vA7+MFvOUo7TiD4JL7/A0AZ0ttOEmT5+YGdgLPrslpN?= =?Windows-1252?Q?XlHd5d+EcgMqwL1ALt0qDZMq/zAX2t3rqDMNV9SGQsxr2k8DV3MxK/dq?= =?Windows-1252?Q?lNVUpYcvO/Ni1LI9IGTy+8UGG2GSVqxf3l5DbrpURBua8lllaV+2wjGN?= =?Windows-1252?Q?juwB2lwzCNOxg01UvMYseNzhs6DMn3+Skv4lqE6X/Da0W07s9/OiYQmG?= =?Windows-1252?Q?Q/EXuza1hLa30m5w/i9/RgVOhPmvJczTqqhvNpmK6FtuKjqqBZquL7jj?= =?Windows-1252?Q?WFuZ4U9Ofh9h/oXccfHAisadunrCCJoeYysb0AisDtoI+0B/+oJzXA/G?= =?Windows-1252?Q?rlpkNocJwWwd0ccxyEb06WdMI6hMhBi/57YlNk1GNs/0NtUONNiz4cTk?= =?Windows-1252?Q?6tInmbBSXE6VVgOHLRd1qaj05OVJZr8X52Pe3PTGc8u6w3NUUtzSQZIG?= =?Windows-1252?Q?dbWkDnvXKyn6xt3JdMSGlUWtYV1f46nYx0ucemmKuvAOKn0YSpZsOLda?= =?Windows-1252?Q?q6qo3GbSawvOBp1Ba/7PxUbsyJAmma7WFxS6Lj/tbB3NMi0iB3V9eHhY?= =?Windows-1252?Q?C58PmD//Hya3C1SuzZ34vReaaSTBGr6JZ8nZxqijI6695ODLCqSQjyCJ?= =?Windows-1252?Q?UKpLtHpujhtwohPJa/MUrEepwACjZmTJTm2XK2wDlkKdu0i9LwXwBtDH?= =?Windows-1252?Q?nOcJKZ2g0TAgBCekPlXMB8/NYvsFqo3wWuum6GHmPZwwSlE2CXwCt6y1?= =?Windows-1252?Q?0hJdbwuNYOTgV6oZ+INb4DZQGwctrXWIjH2ZkQBY7VV8TzB/VCbpEnEZ?= =?Windows-1252?Q?7nI/Is044mIDl8kHOLzYVtiNYJexhsdlJuE7Z5fWfHJcp/faLjBa1cYm?= =?Windows-1252?Q?sgxA2auPYUJPlCy1OQE4ciBAkel70aXzmO2ERUkNE1FW8M4A8RRH+MHV?= =?Windows-1252?Q?BCdlpEkMn778j2I8YIl8ed90t3BdR5URtE1OhhvuaMAFmQnHEMiaKxpS?= =?Windows-1252?Q?jxRzljCHNiQ+k0A1TthspqEMcrDHlITh4v04dyj6IqpOOGwQ7n+GWwpn?= =?Windows-1252?Q?+65Ad/exVmuc6RT4Y0Zcmu/CCCVRamqRwuid0ggWQbHTEbiAiiYmULLk?= =?Windows-1252?Q?q4w9+O8qSuHUtdm00TEPgSaCeruRD2YUOH+fu//OOD6Of5QwCpqsD4h7?= =?Windows-1252?Q?UgIs9FnJhLSyNzUfjld4qTJC4MvUZzWpKSdOHWabFOqMLExxLcBbwxbF?= =?Windows-1252?Q?RNDam1UohxYEaaJZGyc0EN0R/pj1K3Sf80dnnZSYgyrQ24vkl2WO+hBy?= =?Windows-1252?Q?shcZk6oq8mZRE4XMal4EfYUGtxJFXrOYbw3qS74XOPHXX76mVcEdnJGD?= =?Windows-1252?Q?eNV4xbhneDS7hA7egnVjtzAr1njLoEa11Xr7PHyZD4paSIeclZ01VZf+?= =?Windows-1252?Q?p7KzsPP/ElxJXNBg3uKyBAOwi/jJlBK0djU+pWulS+YZXT4sWYm3IDoM?= =?Windows-1252?Q?8PtK8yudW0YcQsMIaQq6N8/5lxYRlWSz47Az5+xguT9T5CIx7fmn3tVN?= =?Windows-1252?Q?0afB111gnkIGY3JUpWl26T544g5aCVLMMiGNdJxPBUNnnFQrao6F+cpk?= =?Windows-1252?Q?/Q25y7xdOPFNWzX81+8Gn/LIMZDspbqI/6WZ8MSJh8kYt5x9pylc2uyO?= =?Windows-1252?Q?brSdl/SiFIsKSTAktaWRtLCQ4uelJSUbaCWIwTjLZ2NbOQRf1HqGlw?= =?Windows-1252?Q?=3D=3D?= Content-Type: multipart/alternative; boundary="_000_PA6PR03MB102418866F5C140FB0604E1EBBBAD2PA6PR03MB10241eu_" MIME-Version: 1.0 X-OriginatorOrg: legitsecurity.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA6PR03MB10241.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5dc6129-b884-492d-1a5b-08dd7079facf X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Mar 2025 17:32:15.7563 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 1d036cb2-b1cc-4321-8a87-6f43158d9e1a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fW2+z83dhxWpuLzqpo4mHvM6dceX+dEwmmo3nfWDAbDZvuaUSEzjvUjWP2rR2hT3naJlH7ltZrMNsEIj7GIqXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB10038 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_PA6PR03MB102418866F5C140FB0604E1EBBBAD2PA6PR03MB10241eu_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable First, thanks for the reply :) So, I do know which part is taking a lot of IO time and it's to be honest a= ny node that reads from the disk.. of course, we're running EXPLAIN on our = queries (to be more specific we use auto_explain) but we can't seem to find= what could cause an index scan that reads 34 MB to take more than a second= (1.2 sec).. we do know that our dataset doesn't fit the memory and we were= ok with that but with IO being so slow we just don't know what to do anymo= re. Any other suggestions other than contact AWS (which we did but it seems= this path won't lead anywhere). Thanks again Get Outlook for Android ________________________________ From: Christophe Pettus Sent: Monday, March 31, 2025 6:15:39 PM To: Eden Aharoni Cc: pgsql-general@lists.postgresql.org Subject: [EXTERNAL] Re: RDS IO Read time [You don't often get email from xof@thebuild.com. Learn why this is importa= nt at https://aka.ms/LearnAboutSenderIdentification ] > On Mar 31, 2025, at 06:54, Eden Aharoni wrote: > Is this expected IO read rate? I can=92t help but feel we=92re missing so= mething here.. Really, no particular I/O rate is "expected": if PostgreSQL needs that much= data, it'll use that much I/O to get it. From your description, it's like= ly that it's a case of the working set for the database just not fitting in= to the memory you have, so PostgreSQL needs to go out to secondary storage = a lot to fetch the data. The best first step is to use Performance Insights to see which queries are= using I/O, and run sample ones with EXPLAIN (ANALYZE, BUFFERS) to see wher= e the I/O is being used within the query. Given that you allow users to as= semble arbitrary queries, it's likely that PostgreSQL is having to use a wi= de variety of indexes (or sequential scans), so it can't successfully cache= a particular set in memory. --_000_PA6PR03MB102418866F5C140FB0604E1EBBBAD2PA6PR03MB10241eu_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
First, thanks for the reply :)
So, I do know which part is taking a lot of IO time and i= t's to be honest any node that reads from the disk.. of course, we're runni= ng EXPLAIN on our queries (to be more specific we use auto_explain) but we = can't seem to find what could cause an index scan that reads 34 MB to take more than a second (1.2 sec).. we d= o know that our dataset doesn't fit the memory and we were ok with that but= with IO being so slow we just don't know what to do anymore. Any other sug= gestions other than contact AWS (which we did but it seems this path won't lead anywhere).

Thanks again 


From: Christophe Pettus <= ;xof@thebuild.com>
Sent: Monday, March 31, 2025 6:15:39 PM
To: Eden Aharoni <edena@legitsecurity.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postg= resql.org>
Subject: [EXTERNAL] Re: RDS IO Read time
 
[You don't often get email from xof@thebuild.com. = Learn why this is important at https://aka.ms/Le= arnAboutSenderIdentification ]

> On Mar 31, 2025, at 06:54, Eden Aharoni <edena@legitsecurity.com>= ; wrote:
> Is this expected IO read rate? I can=92t help but feel we=92re missing= something here..

Really, no particular I/O rate is "expected": if PostgreSQL needs= that much data, it'll use that much I/O to get it.  From your descrip= tion, it's likely that it's a case of the working set for the database just= not fitting into the memory you have, so PostgreSQL needs to go out to secondary storage a lot to fetch the data.

The best first step is to use Performance Insights to see which queries are= using I/O, and run sample ones with EXPLAIN (ANALYZE, BUFFERS) to see wher= e the I/O is being used within the query.  Given that you allow users = to assemble arbitrary queries, it's likely that PostgreSQL is having to use a wide variety of indexes (or sequential = scans), so it can't successfully cache a particular set in memory.
--_000_PA6PR03MB102418866F5C140FB0604E1EBBBAD2PA6PR03MB10241eu_--