public inbox for pgsql-performance@postgresql.org  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Русинов Семен <mrpinkolik@gmail.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Improving insert performance
Date: Mon, 04 May 2026 22:49:33 +0200
Message-ID: <5d54261a34994240b7d1bb6861001ec67626f594.camel@cybertec.at> (raw)
In-Reply-To: <c3bbe654-939b-467a-9626-8c0938b7347d@gmail.com>
References: <c3bbe654-939b-467a-9626-8c0938b7347d@gmail.com>

On Tue, 2026-05-05 at 00:01 +0500, Русинов Семен wrote:
> I am trying to optimize PostgreSQL for insert performance and I think 
> I've reaced the limit of my knowledge and experience.
> 
> So far, I was able to reach RPS of 35k inserts per second. But I can't 
> tune it any better, neither I understand where is the bottleneck.
> 
> full_page_writes=off
> fsync=off

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 
> used at full, IO is also not the problem, RAM also seems to be fine. I 
> tried scaling synthetic applications but it doesn't give any RPS boost. 
> So I'm stuck here. Have I reached PostgreSQL performance cap? Or do I 
> have a bottleneck somewhere else? I don't have any ideas anymore what 
> 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






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: laurenz.albe@cybertec.at, mrpinkolik@gmail.com
  Subject: Re: Improving insert performance
  In-Reply-To: <5d54261a34994240b7d1bb6861001ec67626f594.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox