Re: How to cripple a postgres server

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to cripple a postgres server
Date: 2002-05-28 03:42:24
Message-ID: 29950.1022557344@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au> writes:
> To clarify my comments, I suspect the problem is that all 800 of the
> backends get the SIGUSR2 at the same time, and all wake up,

That would indeed happen ...

> causing the
> kernel scheduler to go mad trying to decide which one to schedule... If
> the connections aren't idle, the queue never fills up enough to require
> the signals...

... but it doesn't follow that this is causing your problem. All 800
are going to get woken up at the same time anyway (or as close to the
same time as the postmaster can issue the signals, that is). Why does
it make a difference whether they have or soon will process a normal
query? If you are able to prevent the problem by issuing "select 1"
once per second on each connection, then for sure it's not a case of
whether they are busy at receipt of the signal or not. Most of 'em
will not be busy at any given instant, with a load as trivial as that.

Do you use LISTEN/NOTIFY at all? When was your pg_listener table
last vacuumed?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Robert Norris 2002-05-28 03:48:10 Re: How to cripple a postgres server
Previous Message Stephen Robert Norris 2002-05-28 03:28:15 Re: How to cripple a postgres server