Re: Deterioration in performance when query executed in multi threads

From: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
To: Anne Rosset <arosset(at)collab(dot)net>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Deterioration in performance when query executed in multi threads
Date: 2013-05-01 14:12:36
Message-ID: 20130501141236.GG27807@aart.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, May 01, 2013 at 02:05:06PM +0000, Anne Rosset wrote:
> Hi all,
> We are running a stress test that executes one select query with multiple threads.
> The query executes very fast (10ms). It returns 100 rows. I see deterioration in the performance when we have multiple threads executing the query. With 100 threads, the query takes between 3s and 8s.
>
> I suppose there is a way to tune our database. What are the parameters I should look into? (shared_buffer?, wal_buffer?)
>
> Thanks for your help,
> Anne

Try a connection pooler like pgbouncer to keep the number of simultaneous queries
bounded to a reasonable number. You will actually get better performance.

Regards,
Ken

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2013-05-01 15:10:52 Re: BUG #8130: Hashjoin still gives issues
Previous Message Tom Lane 2013-05-01 14:06:55 Re: In progress INSERT wrecks plans on table