Re: Swap on postgres master server

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Nicola Contu <nicola(dot)contu(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Cc: Alessandro Aste <Alessandro(dot)aste(at)gtt(dot)net>
Subject: Re: Swap on postgres master server
Date: 2018-10-16 09:46:20
Message-ID: 60bbd40bebd9bef763f3e62b79ac621a76db9330.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nicola Contu wrote:
> we are running Postgres 10.5 with master slave replication.
>
> This server is on Centos 7 and the strange thing is that we see a lot of swap usage :
>
> [root(at)usnyh-cmd1 ~]# free -m
> total used free shared buff/cache available
> Mem: 257652 7555 5559 12804 244536 236036
> Swap: 16383 7326 9057
>
> 7GB used.
>
> But can't see it from any of the commands like top etc.
> I am sure it is postgres because it is the only service running on that machine.
>
> Is there anything we can do?
> On the sync slave, the usage is just 400MB.

I recommend that you set "vm.swappiness = 0" using "sysctl" to discourage
the operating system from swapping as much as possible.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nicola Contu 2018-10-16 09:47:51 Re: Swap on postgres master server
Previous Message csusza 2018-10-16 09:27:25 Re: Compile psql 9.6 with SSL Version 1.1.0