Re: Postgres 9.1: Adding rows to table causing too much latency in other queries

From: Sushant Sinha <sushant354(at)gmail(dot)com>
To: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Postgres 9.1: Adding rows to table causing too much latency in other queries
Date: 2011-12-19 17:49:47
Message-ID: 1324316987.1844.17.camel@dragflick
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2011-12-19 at 12:41 -0300, Euler Taveira de Oliveira wrote:
> On 19-12-2011 12:30, Sushant Sinha wrote:
> > I recently upgraded my postgres server from 9.0 to 9.1.2 and I am
> > finding a peculiar problem.I have a program that periodically adds
> rows
> > to this table using INSERT. Typically the number of rows is just 1-2
> > thousand when the table already has 500K rows. Whenever the program
> is
> > adding rows, the performance of the search query on the same table
> is
> > very bad. The query uses the gin index and the tsearch ranking
> function
> > ts_rank_cd.
> >
> How bad is bad? It seems you are suffering from don't-fit-on-cache
> problem, no?

The memory is 32GB and the entire database is just 22GB. Even "vmstat 1"
does not show any disk activity.

I was not able to isolate the performance numbers since I have observed
this only on the production box where the number of requests keep
increasing as the box gets loaded. But a query that takes 1sec normally
is taking more than 10secs (not sure whether it got the same number of
CPU cycles). Is there a way to find that?

-Sushant.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-12-19 17:52:11 Re: Command Triggers
Previous Message Sushant Sinha 2011-12-19 17:43:39 Re: Postgres 9.1: Adding rows to table causing too much latency in other queries