limit number of concurrent callers to a stored proc? - Mailing list pgsql-performance

From Alan Stange
Subject limit number of concurrent callers to a stored proc?
Date
Msg-id 4303E704.4030200@rentec.com
Whole thread Raw
Responses Re: limit number of concurrent callers to a stored proc?  (Gavin Sherry <swm@alcove.com.au>)
Re: limit number of concurrent callers to a stored proc?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: limit number of concurrent callers to a stored  (Ron <rjpeace@earthlink.net>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [HACKERS] bitmap scan issues 8.1 devel
Next
From: Jeremiah Jahn
Date:
Subject: extremly low memory usage