From: PFC <lists@boutiquenumerique.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Bob Ippolito <bob@redivi.com>
Cc: Mark Cotner <mcotner@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: sustained update load of 1-2k/sec
Date: Fri, 19 Aug 2005 20:11:54 +0200
Message-ID: <op.svrot4mxth1vuj@localhost> (raw)
In-Reply-To: <17690.1124458553@sss.pgh.pa.us>
References: <20050819082404.53751.qmail@web32915.mail.mud.yahoo.com>
<67788A4A-4011-49AB-B329-683FD9532661@redivi.com>
<17690.1124458553@sss.pgh.pa.us>
> While I agree that hundreds of threads seems like overkill, I think the
> above advice might be going too far in the other direction. The problem
> with single-threaded operation is that any delay affects the whole
> system --- eg, if you're blocked waiting for disk I/O, the CPU doesn't
You use UDP which is a connectionless protocol... then why use threads ?
I'd advise this :
Use asynchronous network code (one thread) to do your network stuff. This
will lower the CPU used by this code immensely.
Every minute, dump a file contianing everything to insert into the table.
Use another thread to COPY it into the DB, in a temporary table if you
wish, and then INSERT INTO ... SELECT.
This should be well adapted to your requirements.
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: lists@boutiquenumerique.com, tgl@sss.pgh.pa.us, bob@redivi.com, mcotner@yahoo.com
Subject: Re: sustained update load of 1-2k/sec
In-Reply-To: <op.svrot4mxth1vuj@localhost>
* 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