Skip site navigation (1) Skip section navigation (2)

Re: Free Cache Memory (Linux) and Postgresql

From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: "Denis Gasparin" <denis(at)edistar(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Free Cache Memory (Linux) and Postgresql
Date: 2008-09-30 11:46:56
Message-ID: 36e682920809300446q4108b355xbecf384b0c9d1ae2@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On Tue, Sep 30, 2008 at 3:33 AM, Denis Gasparin <denis(at)edistar(dot)com> wrote:
> Hi.
>
> I'm evaluating to issue the drop_caches kernel command (echo 3 >
> /proc/sys/vm/drop_caches) in order to free unused pagecache, directory
> entries and inodes.
>
> I'm thinking to schedule the command during low load moments after
> forcing a sync command.
>
> I wonder if this can cause pgsql problems of any kind. Any idea?

Yes, it can.  Postgres relies heavily on the OS' file system cache, if
you wipe it out, you're going to have quite an I/O storm on a large
database.

What are you trying to accomplish?  By itself, sync will flush all
dirty file system blocks to disk and leave them in memory.

-- 
Jonah H. Harris, Senior DBA
myYearbook.com

In response to

pgsql-general by date

Next:From: Sam MasonDate: 2008-09-30 12:04:29
Subject: Re: PostgreSQL Cache
Previous:From: Russell SmithDate: 2008-09-30 10:20:39
Subject: Re: ODBC driver crash

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group