pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alan Stange <stange@rentec.com>
To: pgsql-performance@postgresql.org
Subject: limit number of concurrent callers to a stored proc?
Date: Wed, 17 Aug 2005 21:40:20 -0400
Message-ID: <4303E704.4030200@rentec.com> (raw)

Hello all,

is there a simple way to limit the number of concurrent callers to a 
stored proc?

The problem we have is about 50 clients come and perform the same 
operation at nearly the same time.  Typically, this query takes a few 
seconds to run, but in the case of this thundering herd the query time 
drops to 70 seconds or much more.  The query can return up to 15MB of data.

The machine is a dual opteron, 8 GB memory, lots of fiber channel disk, 
Linux 2.6, etc.

So, I'm thinking that a semaphore than will block more than N clients 
from being in the core of the function at one time would be a good thing. 

Thanks!

-- Alan



view thread (5+ messages)  latest in thread

Message-ID: <4303E704.4030200@rentec.com>
Permalink:  ../4303E704.4030200@rentec.com/
Also on:    postgresql.org/message-id/4303E704.4030200@rentec.com

 · 

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: stange@rentec.com
  Subject: Re: limit number of concurrent callers to a stored proc?
  In-Reply-To: <4303E704.4030200@rentec.com>

* 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