Re: Disk caching

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: "mac_man2008(at)yahoo(dot)it" <mac_man2008(at)yahoo(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Disk caching
Date: 2010-07-22 01:25:05
Message-ID: 4C479DF1.5050701@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

mac_man2008(at)yahoo(dot)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(at)2ndQuadrant(dot)com www.2ndQuadrant.us

In response to

  • Disk caching at 2010-07-21 15:54:23 from mac_man2008@yahoo.it

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-07-22 01:26:33 Re: pg_dump(all) --quote-all-identifiers
Previous Message KaiGai Kohei 2010-07-22 01:18:50 Re: ExecutorCheckPerms() hook