Re: Swap on postgres master server - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Swap on postgres master server
Date
Msg-id 60bbd40bebd9bef763f3e62b79ac621a76db9330.camel@cybertec.at
Whole thread Raw
In response to Swap on postgres master server  (Nicola Contu <nicola.contu@gmail.com>)
List 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@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



pgsql-general by date:

Previous
From: csusza
Date:
Subject: Re: Compile psql 9.6 with SSL Version 1.1.0
Next
From: Nicola Contu
Date:
Subject: Re: Swap on postgres master server