pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Jay Manni <JManni@fireeye.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: High Frequency Inserts to Postgres Database vs Writing to a File
Date: Thu, 05 Nov 2009 09:12:17 +0800
Message-ID: <4AF22671.303@postnewspapers.com.au> (raw)
In-Reply-To: <b42b73150911040559w660d1ad2w38a014fbc34e877f@mail.gmail.com>
References: <95652FF3B9EF3045AC4AE8FE5AF8671EED65CF6B@mail2.FireEye.com>
	<60B0F2124D07B942988329B5B7CA393D01E5B93FF7@mail2.FireEye.com>
	<b42b73150911040559w660d1ad2w38a014fbc34e877f@mail.gmail.com>

Merlin Moncure wrote:

> Postgres can handle multiple 1000 insert/sec but your hardware most
> likely can't handle multiple 1000 transaction/sec if fsync is on.

commit_delay or async commit should help a lot there.

http://www.postgresql.org/docs/8.3/static/wal-async-commit.html
http://www.postgresql.org/docs/8.3/static/runtime-config-wal.html

Please do *not* turn fsync off unless you want to lose your data.

> If you are bulk inserting 1000+ records/sec all day long, make sure
> you have provisioned enough storage for this (that's 86M records/day),

plus any index storage, room for dead tuples if you ever issue UPDATEs, etc.

--
Craig Ringer



view thread (11+ messages)  latest in thread

Message-ID: <4AF22671.303@postnewspapers.com.au>
Permalink:  ../4AF22671.303@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4AF22671.303@postnewspapers.com.au

 · 

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: craig@postnewspapers.com.au, mmoncure@gmail.com, JManni@fireeye.com
  Subject: Re: High Frequency Inserts to Postgres Database vs Writing to a File
  In-Reply-To: <4AF22671.303@postnewspapers.com.au>

* 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