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

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches
Дата
Msg-id CAOR=d=3KMbCpUmdfJuAPm6pSLJNDsPZFvJ2wXAhaPri_imEviw@mail.gmail.com
обсуждение исходный текст
Ответ на Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches  ("AL-Temimi, Muthana" <muthana.al-temimi@tu-harburg.hamburg.de>)
Список pgsql-admin
On Mon, Jul 6, 2015 at 1:50 AM, AL-Temimi, Muthana
<muthana.al-temimi@tu-harburg.hamburg.de> wrote:
> Hello there,
>
>
>
> 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.
>
>
>
> Because I have a problem with cached memory on the linux Server beacaue
> there are increasing in cached memory till swap. Therefore I’m looking for
> workaround job works daily night to release the cached memory.
>
>
>
> But if I used it will be there a lost in information. I used the sync before
> drop the caches.

It's perfectly safe to drop cache, however, this is the wrong solution
to your problem. A few points.

1: older kernels don't do well with large memory and swap, and make
some questionable decisions. In the past I have simply turned off swap
on machines with a lot of memory due to this behaviour. Let's face it,
if a machine with 256G RAM needs swap, something's gone terribly wrong
with memory usage.

2: there are tunables that will slow down this behaviour, if not
outright stop it, particularly the vm.swappiness setting. See sysctl
for how to set that to 0.

3: You need to define your problem better for us. To give advice we
need to see what's happening. Linux tends to swap out little used
stuff to make room for cache. In this case you may not have an actual
problem to worry about anyway.


В списке pgsql-admin по дате отправления:

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches
Следующее
От: Kiki Sugiaman
Дата:
Сообщение: Re: Running two postgresql servers in same Ubuntu machine