pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Aren Cambre <aren@arencambre.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres refusing to use >1 core
Date: Wed, 11 May 2011 09:35:01 +0800
Message-ID: <4DC9E7C5.9080309@postnewspapers.com.au> (raw)
In-Reply-To: <BANLkTimi+2nviLvWU4zKGtG688+Z84DF6w@mail.gmail.com>
References: <BANLkTimohiUa6rOYdxYTwqmvSUg2CRYMHg@mail.gmail.com>
	<4DC81A3F020000250003D433@gw.wicourts.gov>
	<BANLkTimNTLqQgQeyu=FPOn-5x6F4XnVBJA@mail.gmail.com>
	<4DC81D56020000250003D438@gw.wicourts.gov>
	<BANLkTi=FH4rX-7OtS9ozjuyXQTNTiRqCmg@mail.gmail.com>
	<BANLkTinwkj7syvKkYzU_O7DD14EMzk2Zmg@mail.gmail.com>
	<BANLkTi=BvGMvsBNq8DUt=_MPJXZjcC0TWg@mail.gmail.com>
	<4DC8B893.3060908@postnewspapers.com.au>
	<BANLkTimi+2nviLvWU4zKGtG688+Z84DF6w@mail.gmail.com>

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?

--
Craig Ringer



view thread (46+ messages)  latest in thread

Message-ID: <4DC9E7C5.9080309@postnewspapers.com.au>
Permalink:  ../4DC9E7C5.9080309@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4DC9E7C5.9080309@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, aren@arencambre.com
  Subject: Re: Postgres refusing to use >1 core
  In-Reply-To: <4DC9E7C5.9080309@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