Skip site navigation (1) Skip section navigation (2)

Re: turn off caching for performance test

From: Arjen van der Meijden <acmmailing(at)tweakers(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: turn off caching for performance test
Date: 2010-08-26 16:50:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Isn't it more fair to just flush the cache before doing each of the 
queries? In real-life, you'll also have disk caching... Flushing the 
buffer pool is easy, just restart PostgreSQL (or perhaps there is a 
admin command for it too?). Flushing the OS-disk cache is obviously 
OS-dependent, for linux its trivial:

Best regards,


On 26-8-2010 12:32 Willy-Bas Loos wrote:
> Hi,
> I have a colleague that is convinced that the website is faster if
> enable_seqscan is turned OFF.
> I'm convinced of the opposite (better to leave it ON), but i would like
> to show it, prove it to him.
> Now the first query we tried, would do a bitmap heap scan instead of a
> seqscan when the latter were disabled, to exclude about 50% of the
> records (18K of 37K records).
> The bitmap heap scan is 3% faster, so that didn't really plea my case.
> The thing is that by the time we tried it, the data had been cached, so
> there is no penalty for the use of the index (HDD retention on random
> access). So it's logical that the index lookup is faster, it looks up
> less records.
> Now i'm looking for a way to turn off the caching, so that we'll have a
> fair test.
> It makes no sense to me to set shared_buffers really low. Any tips?
> Cheers,
> --
> "Patriotism is the conviction that your country is superior to all
> others because you were born in it." -- George Bernard Shaw

In response to

pgsql-performance by date

Next:From: Pierre CDate: 2010-08-26 17:37:21
Subject: Re: turn off caching for performance test
Previous:From: Willy-Bas LoosDate: 2010-08-26 10:32:57
Subject: turn off caching for performance test

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group