Re: Disk caching - Mailing list pgsql-hackers

From Greg Smith
Subject Re: Disk caching
Date
Msg-id 4C479DF1.5050701@2ndquadrant.com
Whole thread Raw
In response to Disk caching  ("mac_man2008@yahoo.it" <mac_man2008@yahoo.it>)
List pgsql-hackers
mac_man2008@yahoo.it wrote:
> Since I am interested just in work_mem variations, I should prevent 
> each query to take advantages from revious executions of the 22 
> queries them selves. For example, taking cache advantages.

work_mem has nothing to do with disk caching; it controls whether larger 
sorts are done using disk or memory.  The main parameter that controls 
the size of the disk cache is shared_buffers.  If you found the 
descriptions in the manual confusing, 
http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server is another 
guide to what the settings mean that may help you out.

If you want to eliminate caching effects from your test, you will need 
to both restart the database server and flush the operating system 
cache.  You can do this easily on Linux:  
http://linux-mm.org/Drop_Caches but it's not as simple to do on most 
other platforms without rebooting.

P.S. The right list for this discussion if you want to talk about it 
more is pgsql-performance.  This one is focused at things involving 
PostgreSQL development, not questions related to using the database.

-- 
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us



pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: ExecutorCheckPerms() hook
Next
From: Robert Haas
Date:
Subject: Re: pg_dump(all) --quote-all-identifiers