Skip site navigation (1) Skip section navigation (2)

Re: sustained update load of 1-2k/sec

From: PFC <lists(at)boutiquenumerique(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bob Ippolito" <bob(at)redivi(dot)com>
Cc: "Mark Cotner" <mcotner(at)yahoo(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: sustained update load of 1-2k/sec
Date: 2005-08-19 18:11:54
Message-ID: op.svrot4mxth1vuj@localhost (view raw or flat)
Thread:
Lists: pgsql-performance
> 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.

In response to

Responses

pgsql-performance by date

Next:From: RonDate: 2005-08-19 18:42:43
Subject: Re: extremly low memory usage
Previous:From: RonDate: 2005-08-19 17:57:46
Subject: Re: sustained update load of 1-2k/sec

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group