From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michal Taborsky <michal@taborsky.cz>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow INSERT
Date: Tue, 29 Jun 2004 11:22:48 -0400
Message-ID: <29835.1088522568@sss.pgh.pa.us> (raw)
In-Reply-To: <40E1863B.9070208@taborsky.cz>
References: <40E160E6.4080105@taborsky.cz>
<29095.1088519446@sss.pgh.pa.us>
<40E1863B.9070208@taborsky.cz>
Michal Taborsky <michal@taborsky.cz> writes:
> I ran some tests to support this hypothesis. Every 500th insert is a tad
> slower, but it is insignificant (normally the INSERT lasts 1.5ms, every
> 500th is 9ms). During my tests (10 runs of 1000 INSERTS) I had
> experienced only one "slow" insert (2000ms). It is clearly caused by
> other processes running on this server, but such degradation of
> performance is highly suspicious, because the server very rarely goes
> over load 1.0.
Actually, the simpler theory is that the slowdown is caused by
background checkpoint operations. Now a checkpoint would slow
*everything* down not only this one insert, so maybe that's not
the right answer either, but it's my next idea. You could check
this to some extent by manually issuing a CHECKPOINT command and
seeing if you get an insert hiccup. Note though that closely
spaced checkpoints will have less effect, because less I/O will
be triggered when not much has changed since the last one. So
you'd want to wait a bit between experiments.
regards, tom lane
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: tgl@sss.pgh.pa.us, michal@taborsky.cz
Subject: Re: Slow INSERT
In-Reply-To: <29835.1088522568@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox