Re: Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: "AL-Temimi, Muthana" <muthana(dot)al-temimi(at)tu-harburg(dot)hamburg(dot)de>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches
Date: 2015-07-06 15:37:26
Message-ID: 23816193.2878261.1436197046286.JavaMail.yahoo@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"AL-Temimi, Muthana" <muthana(dot)al-temimi(at)tu-harburg(dot)hamburg(dot)de>
wrote:

> is there any problem if I use the following command:
> “sync; echo 1 > /proc/sys/vm/drop_caches”
> to release the cached memory on linux server.

The only problem would be that performance would tend to be poor if
you discard the OS cache.

> Because I have a problem with cached memory on the linux Server
> beacaue there are increasing in cached memory till swap.

You probably have not configured PostgreSQL very well. Please
describe your hardware and OS and show the results of running these
queries:

SELECT version();
SELECT name, current_setting(name), SOURCE
FROM pg_settings
WHERE SOURCE NOT IN ('default', 'override');

Also, if you could show about 30 seconds of output from `vmstat 1`
while the swapping is happening, that would help us provide useful
advice.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2015-07-06 18:40:38 Re: Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches
Previous Message Igor Neyman 2015-07-06 13:22:28 Re: pg_upgrade