Re: Linux/PostgreSQL scalability issue - problem with 8 cores

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Moisey <adrian(at)careerjunction(dot)co(dot)za>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Linux/PostgreSQL scalability issue - problem with 8 cores
Date: 2008-01-15 15:51:04
Message-ID: 24097.1200412264@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Adrian Moisey <adrian(at)careerjunction(dot)co(dot)za> writes:
>> we've found it: TRUNCATE

> I haven't been following this thread. Can someone please explain to me
> why TRUNCATE causes these spikes?

It's not so much the TRUNCATE as the overhead of broadcasting the
resultant catalog changes to the many hundreds of (mostly idle)
backends he's got --- all of which respond by trying to lock the
shared sinval message queue at about the same time.

You could see the whole thread as an object lesson in why connection
pooling is a good idea. But certainly it seems that sinval is the
next bottleneck in terms of being able to scale Postgres up to very
large numbers of backends.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-01-15 16:26:00 Re: Linux/PostgreSQL scalability issue - problem with 8 cores
Previous Message Jakub Ouhrabka 2008-01-15 15:45:57 Re: Linux/PostgreSQL scalability issue - problem with 8 cores