Re: Maintaining cluster order on insert

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Maintaining cluster order on insert
Date: 2007-07-10 14:34:39
Message-ID: 19371.1184078079@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Greg Smith <gsmith(at)gregsmith(dot)com> writes:
> On Mon, 9 Jul 2007, Tom Lane wrote:
>> The hardware is just a Dell x86_64 workstation with crappy IDE disk, so
>> maybe things would look better elsewhere, but it's all I have to work
>> with.

> Do you have write-caching turned off on the drive so INSERTs are being
> rate-limited by WAL syncs? Trying to characterize the class of setup
> you're using.

It's just desktop-grade junk :-(. Feel free to repeat the test on
something more serious.

> The part that seemed curious to me about your results in the unpatched
> version is why the first INSERT takes 2.4 seconds, while the second takes
> 12.2 then later ones settle from 17-23 s. I could understand the 12-23
> variation, but that the first one fires off in 2.4 seems kind of fishy;

The test seemed to be mostly I/O bound according to vmstat. I supposed
that it was fast up until the kernel's available space was full of dirty
pages, and then subsequent writes would be constrained by actual disk
write bandwidth. Anyway the numbers seemed relatively consistent after
the setup and first test cycle, so I think the part I was actually
trying to draw conclusions from was probably real enough.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-07-10 14:41:31 Re: 2PC-induced lockup
Previous Message Tom Lane 2007-07-10 13:54:53 Re: russian case-insensitive regexp search not working

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Smith 2007-07-10 15:25:30 Re: Maintaining cluster order on insert
Previous Message Tom Lane 2007-07-10 13:41:01 Re: Maintaining cluster order on insert