Re: PostgreSQL Cache - Mailing list pgsql-general

From Sam Mason
Subject Re: PostgreSQL Cache
Date
Msg-id 20080929112634.GM7271@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to Re: PostgreSQL Cache  (Greg Smith <gsmith@gregsmith.com>)
Responses Re: PostgreSQL Cache  (Greg Smith <gsmith@gregsmith.com>)
List pgsql-general
On Mon, Sep 29, 2008 at 02:55:52AM -0400, Greg Smith wrote:
> On Mon, 29 Sep 2008, Matthew Pulis wrote:
> >I need to perform some timed testing, thus need to make sure that
> >disk cache does not affect me. Is clearing the OS (Ubuntu) disk
> >cache, (by running: sudo echo 3 | sudo tee /proc/sys/vm/drop_caches)
> >enough to do this?
>
> 3) sudo echo 3 > /proc/sys/vm/drop_caches

I'm not sure about the rest, but shouldn't this be:

  echo 3 | sudo tee /proc/sys/vm/drop_caches

the OP's "sudo echo 3" seems redundant; "echo" doesn't need to be run
with higher privileges, only the writing process needs that.  As an
aside, it would be nicer if there was a more appropriately program than
tee but I've yet to find one.


  Sam

pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: Replication using slony-I
Next
From: "Joey K."
Date:
Subject: access public relation from a private database