pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: Dimitri Fontaine <dfontaine@hi-media.com>
Cc: pgsql-performance@postgresql.org, "Jignesh K. Shah" <J.K.Shah@sun.com>
Cc: Greg Smith <gsmith@gregsmith.com>
Subject: Re: Benchmark Data requested --- pgloader CE design ideas
Date: Wed, 06 Feb 2008 11:45:24 +0000
Message-ID: <1202298324.4252.965.camel@ebony.site> (raw)
In-Reply-To: <200802061227.58668.dfontaine@hi-media.com>
References: <1202150236.4252.521.camel@ebony.site>
	<1202221496.4252.680.camel@ebony.site>
	<200802051815.25800.dfontaine@hi-media.com>
	<200802061227.58668.dfontaine@hi-media.com>

On Wed, 2008-02-06 at 12:27 +0100, Dimitri Fontaine wrote:
> Multi-Threading behavior and CE support
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 
> Now, pgloader will be able to run N threads, each one loading some
> data to a 
> partitionned child-table target. N will certainly be configured
> depending on 
> the number of server cores and not depending on the partition
> numbers...
> 
> So what do we do when reading a tuple we want to store in a partition
> which 
> has no dedicated Thread started yet, and we already have N Threads
> running?
> I'm thinking about some LRU(Thread) to choose a Thread to terminate
> (launch 
> COPY with current buffer and quit) and start a new one for the
> current 
> partition target.
> Hopefully there won't be such high values of N that the LRU is a bad
> choice 
> per see, and the input data won't be so messy to have to stop/start
> Threads 
> at each new line.

For me, it would be good to see a --parallel=n parameter that would
allow pg_loader to distribute rows in "round-robin" manner to "n"
different concurrent COPY statements. i.e. a non-routing version. Making
that work well, whilst continuing to do error-handling seems like a
challenge, but a very useful goal.

Adding intelligence to the row distribution may be technically hard but
may also simply move the bottleneck onto pg_loader. We may need multiple
threads in pg_loader, or we may just need multiple sessions from
pg_loader. Experience from doing the non-routing parallel version may
help in deciding whether to go for the routing version.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com 




view thread (16+ messages)  latest in thread

Message-ID: <1202298324.4252.965.camel@ebony.site>
Permalink:  ../1202298324.4252.965.camel@ebony.site/
Also on:    postgresql.org/message-id/1202298324.4252.965.camel@ebony.site

 · 

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: simon@2ndquadrant.com, dfontaine@hi-media.com, J.K.Shah@sun.com, gsmith@gregsmith.com
  Subject: Re: Benchmark Data requested --- pgloader CE design ideas
  In-Reply-To: <1202298324.4252.965.camel@ebony.site>

* 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