From: | François Beausoleil <francois(at)teksol(dot)info> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: COPY and indices? |
Date: | 2012-03-14 17:38:53 |
Message-ID: | 99F35E2DB5FB419BB0A454099C749640@ftml.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Le mardi 13 mars 2012 à 11:15, Merlin Moncure a écrit :
> 2012/3/13 François Beausoleil <francois(at)teksol(dot)info (mailto:francois(at)teksol(dot)info)>:
> >
> > I'll go with the COPY, since I can live with the batched requirements just fine.
>
> 30-40 'in transaction' i/o bound inserts is so slow as to not really
> be believable unless each record is around 1 megabyte because being in
> transaction removes storage latency from the equation. Even on a
> crappy VM. As a point of comparison my sata workstation drive can do
> in the 10s of thousands. How many records are you inserting per
> transaction?
>
I took the time to gather statistics about the database server: https://gist.github.com/07bbf8a5b05b1c37a7f2
The files are a series of roughly 30 second samples, while the system is under production usage. When I quoted 30-40 transactions per second, I was actually referring to the number of messages processed from my message queue. Going by the PostgreSQL numbers, xact_commit tells me I manage 288 commits per second. It's much better than I anticipated.
Anyways, if anybody has comments on how I could increase throughput, I'd appreciate. My message queues are almost always backed up by 1M messages, and it's at least partially related to PostgreSQL: if the DB can write faster, I can manage my backlog better.
I'm still planning on going with batch processing, but I need to do something ASAP to give me just a bit more throughput.
Thanks!
François
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Vázquez | 2012-03-14 18:05:42 | Searching email, Full Text Search prefix, not expected results |
Previous Message | Tom Lane | 2012-03-14 16:16:58 | Re: Alter Column from inet to inet[] |