From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Really bad insert performance: what did I do wrong?
Date: Fri, 21 Feb 2003 12:37:19 -0500
Message-ID: <20030221123719.C16866@mail.libertyrms.com> (raw)
In-Reply-To: <3E566022.5010200@digital-ics.com>
References: <3E564695.7030906@digital-ics.com>
<20030221115917.A16866@mail.libertyrms.com>
<3E566022.5010200@digital-ics.com>
On Fri, Feb 21, 2003 at 12:21:38PM -0500, Kevin White wrote:
> Andrew Sullivan wrote:
> > What's the disk subsystem? Is fsync turned on in both cases? And is
> > your IDE drive lying to you about what it's doing.
>
> It is IDE. How do I turn fsync on or off? (All I can find in the man
> is a function call to fsync...is there something else?)
By default, Postgres calls fsync() at every COMMIT. Lots of IDE
drives lie about whether the fsync() succeeded, so you get better
performance than you do with SCSI drives; but you're not really
getting that performance, because the fsync isn't effectve.
On Linux, I think you can use hdparm to fix this. I believe the
write caching is turned off under Solaris, but I'm not sure.
Anyway, you can adjust your postgresql.conf file to turn off fsync.
> This box only has 1 gig, and I've only set up 200 shared buffers...at
> this point, it is only me hitting it. Increasing the shared buffers
> might help, but I haven't yet found the info I need to do that
> intelligently.
For stright inserts, it shouldn't matter, and that seems low enough
that it shouldn't be a problem.
You should put WAL on another disk, as well, if you can.
Also, try using truss to see what the backend is doing. (truss -c
gives you a count and gives some time info.)
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: andrew@libertyrms.info
Subject: Re: Really bad insert performance: what did I do wrong?
In-Reply-To: <20030221123719.C16866@mail.libertyrms.com>
References: <3E564695.7030906@digital-ics.com> <20030221115917.A16866@mail.libertyrms.com> <3E566022.5010200@digital-ics.com> <20030221123719.C16866@mail.libertyrms.com>
* 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