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.96) (envelope-from ) id 1wK0EV-000U9A-26 for pgsql-performance@arkaria.postgresql.org; Mon, 04 May 2026 20:49:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wK0EU-008ufj-1V for pgsql-performance@arkaria.postgresql.org; Mon, 04 May 2026 20:49:38 +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.96) (envelope-from ) id 1wK0EU-008ufa-0a for pgsql-performance@lists.postgresql.org; Mon, 04 May 2026 20:49:38 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wK0ER-00000000CY6-2j25 for pgsql-performance@postgresql.org; Mon, 04 May 2026 20:49:37 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-48a563e4ef7so43435565e9.0 for ; Mon, 04 May 2026 13:49:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1777927774; x=1778532574; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=JwW1hcdVej7lO3h2AZGTlU7jrPYPGdRns3qVojeffFk=; b=kZGEJlpuaGEUxC3PlFUQ+QPkx2iMJshs0QomKt+w8IbdIyQT+/crEMTHHVo8GQ3BPf 3kc5W8QI7JJvAC/+Xv4JTrNI+P8QFV2Bra550POw4LtdKiNeCKvLXMSSBwndRwGfOQWc TWx3Hzn3ra4wkYeOwpwDI0UrCX0/J8/Ii9QrENTHy5ryKrCe01JWpHv6LvlTP5fq7cnl qSuPbhVbsFCxp58Vx8lUdxnE/uFlBEH3/rjz7scbc7uLYlvkVBCBNO/jDfru3HEyhvLD 7Jy9OLpQeXZDh4Lx1kbjJwO6tPhlxTE4YX6wvaC+V0Ks+n/gaCazEuATK+zfxxy81Kzy 7JUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777927774; x=1778532574; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JwW1hcdVej7lO3h2AZGTlU7jrPYPGdRns3qVojeffFk=; b=Swlb/beUsZ33tBr50f4k15Ssvu8eTEQQUVPGrmkFCR1lJ8oUiyCtJZuIP6r9rUiv4a E23jJmvV7YmejoLZE+2+Th7ua/MPLe9DqabkR59LyVXsDuCul7fzfO7+pcIWuQ9mvJMg 3FVfJb6ITJ891GQg+xZ+K/TJ2vFwf7ICujIqNmQzLO06zNPseCvsQNy2NE8sD8Xxe0ik hjJyQXtrqp5xRm1TOiJ2bV+gChrANU02lq3F6gAqfuW3z+W/tNhfvjhlg1pUzsd0BAOs FScTRTQyZ/RwqhJZSU+Bjy4IVVrwLkPzDzweJAVHo5O77XZ62agSF8exl2pPZVQFc2sv 73OQ== X-Forwarded-Encrypted: i=1; AFNElJ+/5AyArswNzd8INU4dITH8KBd0bEF3b5SWVSkvv8VOMqqPFjGjsFJPmkzGTOXo+XzAOHFlrsoPeEYYh6yR9N9MVQ==@postgresql.org X-Gm-Message-State: AOJu0Yyi1jgZaREu3JP2t31DWHIeKjbRNYkS5oXKbcN2Rdq4d7nje3Dr odQvE9KfrtpX3I2uSs+K5NB8SFj4JUBqXe5qKsqi6UUoDowRnaUY98skQW9YRs0Ix77oskgdFn/ lLjnVsJ8= X-Gm-Gg: AeBDiesjLf+JOyRfKTO+zSS2TWA+7dj0niRl5aiiuP/OsZu8WFDx6K/HR8vTd6kTtjI 3b4mKrPLh4Wh5GnTLn8rTyrp8XoRveuT+EYECDAnxL+pQcF0GetDNclPzuv6deny1aX+wFpZu2m 9MYRTn2eKUZ9lMcRNtkINs2trZhzAIj7XdaHl6hVSk2tMIRiI3jvtqQlpP0+w244toocloz+R65 X4FPkRCbxaLYpacYa7jnB8oMDCfAJde/zfGp9jOfXare1mpWGd94j6OVFEdrNlDHVI2xoPU3uje cTkgGlM30SEHJAAi1fXc79h2d71F9Fg6Qq19Up2eU1VNglrcnZn/wjzm31BUuRnEb4rVSRfSv5K mRV2O7s1OMrUssQg+K2OavmHMGLEqIvtZtRytC2faSGF5aBn+EnHLywevbsxhV0Ph3MH9+VAC6/ KgBjxBov2hSWMPCZmYNZIlPlfV9hLR9Vy6xRkXWdNgHrwunkqsAcLrukygkqtd1JbD X-Received: by 2002:a05:600c:a111:b0:486:fd5c:2b35 with SMTP id 5b1f17b1804b1-48d18bdc581mr1419655e9.13.1777927774063; Mon, 04 May 2026 13:49:34 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([2001:871:260:1fd7:eaff:6acc:1732:cc8e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a81ed69fasm416991635e9.3.2026.05.04.13.49.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2026 13:49:33 -0700 (PDT) Message-ID: <5d54261a34994240b7d1bb6861001ec67626f594.camel@cybertec.at> Subject: Re: Improving insert performance From: Laurenz Albe To: =?UTF-8?Q?=D0=A0=D1=83=D1=81=D0=B8=D0=BD=D0=BE=D0=B2_?= =?UTF-8?Q?=D0=A1=D0=B5=D0=BC=D0=B5=D0=BD?= , "pgsql-performance@postgresql.org" Date: Mon, 04 May 2026 22:49:33 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2026-05-05 at 00:01 +0500, =D0=A0=D1=83=D1=81=D0=B8=D0=BD=D0=BE=D0= =B2 =D0=A1=D0=B5=D0=BC=D0=B5=D0=BD wrote: > I am trying to optimize PostgreSQL for insert performance and I think=20 > I've reaced the limit of my knowledge and experience. >=20 > So far, I was able to reach RPS of 35k inserts per second. But I can't= =20 > tune it any better, neither I understand where is the bottleneck. >=20 > full_page_writes=3Doff > fsync=3Doff Don't, unless you don't mind corrupting your database after a crash. > So I don't see that PostgreSQL is bound to hardware since CPU is not=20 > used at full, IO is also not the problem, RAM also seems to be fine. I= =20 > tried scaling synthetic applications but it doesn't give any RPS boost.= =20 > So I'm stuck here. Have I reached PostgreSQL performance cap? Or do I=20 > have a bottleneck somewhere else? I don't have any ideas anymore what=20 > can I try, I would appreciate any help How many concurrent sessions are you using? Monitor pg_stat_activity and see if there are any frequent wait_events. Yours, Laurenz Albe