Re: Queries sometimes take 1000 times the normal time - Mailing list pgsql-performance

From Russell Garrett
Subject Re: Queries sometimes take 1000 times the normal time
Date
Msg-id MKEGJINFADFODDNOKEJCOECBEAAA.rg@tcslon.com
Whole thread Raw
In response to Re: Queries sometimes take 1000 times the normal time  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
List pgsql-performance
>> The web site queries will jump up one or two orders of magnitude (I
>> have seen a normally 100ms query take in excess of 30 seconds) in
>> duration at seemingly random points. It's not always when the
>> transactions are committing, and it doesn't seem to be during
>> checkpointing either. The same thing happens with WAL switched off.
>> It appears to happen the first time the query runs after a while. If
>> I run the same query immediately afterwards, it will take the normal
>> amount of time.
>
> Looks like it got flushed out of every type of cache and IO scheduler
> could not deliver immediately because of other loads...

Yeah, I wasn't sure what (or how) Postgres caches. The db server does have
2Gb of memory, but then again the database amounts to more than 2Gb, so it's
fairly possible it's getting pushed out of cache. It's also fairly possible
that it's not tuned completely optimally. I wonder if FreeBSD/kernel 2.6
would perform better in such a situation...

Russ


pgsql-performance by date:

Previous
From: Ron Johnson
Date:
Subject: Re: The results of my PostgreSQL/filesystem performance
Next
From: Ludek Finstrle
Date:
Subject: Re: The results of my PostgreSQL/filesystem performance tests