From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
Cc: | Aren Cambre <aren(at)arencambre(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Postgres refusing to use >1 core |
Date: | 2011-05-11 04:26:57 |
Message-ID: | BANLkTi=PxROPQFDt1a6N68e_+5_AojagmA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Tue, May 10, 2011 at 7:35 PM, Craig Ringer
<craig(at)postnewspapers(dot)com(dot)au> wrote:
> On 11/05/11 05:34, Aren Cambre wrote:
>
>> Using one thread, the app can do about 111 rows per second, and it's
>> only exercising 1.5 of 8 CPU cores while doing this. 12,000,000 rows /
>> 111 rows per second ~= 30 hours.
>
> I don't know how I missed that. You ARE maxing out one cpu core, so
> you're quite right that you need more threads unless you can make your
> single worker more efficient.
>
> Why not just spawn more copies of your program and have them work on
> ranges of the data, though? Might that not be simpler than juggling
> threading schemes?
I suggested that earlier. But now I'm wondering if there's
efficiencies to be gained by moving all the heavy lifting to the db as
well as splitting thiings into multiple partitions to work on. I.e.
don't grab 1,000 rows and work on them on the client side and then
insert data, do the data mangling in the query in the database. My
experience has been that moving things like this into the database can
result in performance gains of several factors, taking hour long
processes and making them run in minutes.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2011-05-11 07:09:27 | Re: help speeding up a query in postgres 8.4.5 |
Previous Message | Scott Marlowe | 2011-05-11 03:13:31 | Re: Postgres NoSQL emulation |