Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CD1D59FB5E2 for ; Sun, 18 Mar 2007 15:46:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 57556-09-2 for ; Sun, 18 Mar 2007 15:46:41 -0300 (ADT) X-Greylist: delayed 00:24:03.381612 by SQLgrey-1.7.4 Received: from smtp.asterdata.net (67.104.106.2.ptr.us.xo.net [67.104.106.2]) by postgresql.org (Postfix) with ESMTP id DD1FB9FB465 for ; Sun, 18 Mar 2007 15:46:40 -0300 (ADT) Received: from smtp.asterdata.net (localhost.localdomain [127.0.0.1]) by smtp.asterdata.net (Postfix) with ESMTP id C839A795A4 for ; Sun, 18 Mar 2007 11:22:31 -0700 (PDT) Received: by smtp.asterdata.net (Postfix, from userid 109) id 9E21A795A6; Sun, 18 Mar 2007 11:22:31 -0700 (PDT) Received: from webmail.asterdata.net (localhost.localdomain [127.0.0.1]) by smtp.asterdata.net (Postfix) with ESMTP id B9455795A4 for ; Sun, 18 Mar 2007 11:22:30 -0700 (PDT) Received: from 75.37.29.21 (SquirrelMail authenticated user rangarajan.vasudevan@asterdata.com) by webmail.asterdata.net with HTTP; Sun, 18 Mar 2007 11:22:30 -0700 (PDT) Message-ID: <53280.75.37.29.21.1174242150.squirrel@webmail.asterdata.net> In-Reply-To: <45FD5A2D.2090307@boreham.org> References: <1862C4AD-EB83-4D58-B1F2-45BDC47E5608@genetics.utah.edu> <45FD5A2D.2090307@boreham.org> Date: Sun, 18 Mar 2007 11:22:30 -0700 (PDT) Subject: Re: Performance Tuning and Disk Cache From: "Rangarajan Vasudevan" To: pgsql-performance@postgresql.org Reply-To: ranga@asterdata.com User-Agent: SquirrelMail/1.4.8 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-AV-Checked: ClamAV using ClamSMTP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/270 X-Sequence-Number: 23675 If you are running on a Linux kernel, try /proc/sys/vm/drop_caches. I believe the appropriate command is "echo 3 > /proc/sys/vm/drop_caches". Since Postgres has its own cache of data, the above followed by a PG restart should do what you are looking for. Ranga > Barry Moore wrote: > >> I have a very slow query that I'm trying to tune. I think my >> performance tuning is being complicated by the system's page cache. >> >> If a run the query after the system has been busy with other tasks >> for quite a long time then the query can take up to 8-10 minutes to >> complete. If I then rerun the same query it will complete in a >> couple of seconds. >> >> Does anyone know how I can repeatedly run the same query in the >> "worst case scenario" of no postgres data in the disk cache (e.g., >> clear the page cache or force it to be ignored)? > > In my experience the only 100% reliable way to do this is to reboot the > machine. > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq >