pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedCached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches
3+ messages / 3 participants
[nested] [flat]
* Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches
@ 2015-07-06 07:50 AL-Temimi, Muthana <muthana.al-temimi@tu-harburg.hamburg.de>
2015-07-06 15:37 ` Re: Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches Kevin Grittner <kgrittn@ymail.com>
2015-07-06 18:40 ` Re: Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches Scott Marlowe <scott.marlowe@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: AL-Temimi, Muthana @ 2015-07-06 07:50 UTC (permalink / raw)
To: pgsql-admin
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.
Any help will be gratefull
Muthana AL-Temimi
M.Sc. Informations- und Kommunikations-Systeme
Technische Universitaet Hamburg Harburg
-Rechenzentrum-
Am Schwarzenberg-Campus 3
D-21073 Hamburg
Tel.: +49.40.42878.2338
Fax.: +49.40.42793.5160
E-Mail: m.al@tu-harburg.de<mailto:m.al@tu-harburg.de>
http://www.tu-harburg.de/rzt
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches
2015-07-06 07:50 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>
@ 2015-07-06 15:37 ` Kevin Grittner <kgrittn@ymail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Grittner @ 2015-07-06 15:37 UTC (permalink / raw)
To: AL-Temimi, Muthana <muthana.al-temimi@tu-harburg.hamburg.de>; pgsql-admin
"AL-Temimi, Muthana" <muthana.al-temimi@tu-harburg.hamburg.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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Cached Memory increasing up and drop the caches through sync; echo 1 > /proc/sys/vm/drop_caches
2015-07-06 07:50 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>
@ 2015-07-06 18:40 ` Scott Marlowe <scott.marlowe@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Scott Marlowe @ 2015-07-06 18:40 UTC (permalink / raw)
To: AL-Temimi, Muthana <muthana.al-temimi@tu-harburg.hamburg.de>; +Cc: 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.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2015-07-06 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-07-06 07:50 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>
2015-07-06 15:37 ` Kevin Grittner <kgrittn@ymail.com>
2015-07-06 18:40 ` Scott Marlowe <scott.marlowe@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox