Re: Inserting 8MB bytea: just 25% of disk perf used? - Mailing list pgsql-performance

From Matthew Wakeling
Subject Re: Inserting 8MB bytea: just 25% of disk perf used?
Date
Msg-id alpine.DEB.2.00.1001151105430.6195@aragorn.flymine.org
Whole thread Raw
In response to Re: Inserting 8MB bytea: just 25% of disk perf used?  ("fkater@googlemail.com" <fkater@googlemail.com>)
List pgsql-performance
On Thu, 14 Jan 2010, fkater@googlemail.com wrote:
>> The data needs to be written first to the WAL, in order to provide
>> crash-safety. So you're actually writing 1600MB, not 800.
>
> I understand. So the actual throughput is 32MB/s which is
> closer to 43 MB/s, of course.
>
> Can I verify that by temporarily disabling WAL writes
> completely and see if the thoughput is then doubled?

There isn't a magic setting in Postgres to disable the WAL. That would be
far too tempting, and an easy way to break the database.

However, what you can do is to insert the data into the table in the same
transaction as creating the table. Then Postgres knows that no other
transactions can see the table, so it doesn't need to be so careful.

Unfortunately, I don't think even this strategy will work in your case, as
you will be writing to the large object table, which already exists. Could
someone who knows confirm this?

Matthew

--
 Let's say I go into a field and I hear "baa baa baa". Now, how do I work
 out whether that was "baa" followed by "baa baa", or if it was "baa baa"
 followed by "baa"?
         - Computer Science Lecturer

pgsql-performance by date:

Previous
From: Matthew Wakeling
Date:
Subject: Re: a heavy duty operation on an "unused" table kills my server
Next
From: Matthew Wakeling
Date:
Subject: Re: new server I/O setup