How to clear linux file cache? - Mailing list pgsql-general

From Janning Vygen
Subject How to clear linux file cache?
Date
Msg-id 200411161059.46156.vygen@gmx.de
Whole thread Raw
Responses Re: How to clear linux file cache?
List pgsql-general
Hi,

i am testing a few queries in my postgresql DB. The first query after reboot
is always slower because of an empty OS page/file cache.

I want to test my queries without any files in the linux kernel cache, just to
know what would be the worst execution time. At the moment i stop postgresql
and do something like

 find / -name foo

for a few minutes and start postgresql afterwards.

I search manuals with "apropos page cache" and found sync but it doesnt clear
the cache, just writes dirty pages back to disk. I googled for "linux clear
page cache" but did not found what i need. (of course i searched the
archives, too)

So how do i easily empty all page/file caches on linux (2.4.24)?

Sorry for beeing a little bit OT, but i think my question still relates to
postgresql.

kind regards,
janning

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: OID's
Next
From: Peter Eisentraut
Date:
Subject: Re: OID's