pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Nicola Contu <nicola.contu@gmail.com>
To: pgsql-general@lists.postgresql.org
Cc: Alessandro Aste <Alessandro.aste@gtt.net>
Subject: Re: Swap on postgres master server
Date: Tue, 16 Oct 2018 11:46:20 +0200
Message-ID: <60bbd40bebd9bef763f3e62b79ac621a76db9330.camel@cybertec.at> (raw)
In-Reply-To: <CAMTZZh2Uawp=WcuYpakbsMuutYS5NewU24otpub--9YYhfV4rA@mail.gmail.com>
References: <CAMTZZh2Uawp=WcuYpakbsMuutYS5NewU24otpub--9YYhfV4rA@mail.gmail.com>

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





view thread (6+ messages)  latest in thread

Message-ID: <60bbd40bebd9bef763f3e62b79ac621a76db9330.camel@cybertec.at>
Permalink:  ../60bbd40bebd9bef763f3e62b79ac621a76db9330.camel@cybertec.at/
Also on:    postgresql.org/message-id/60bbd40bebd9bef763f3e62b79ac621a76db9330.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, nicola.contu@gmail.com, Alessandro.aste@gtt.net
  Subject: Re: Swap on postgres master server
  In-Reply-To: <60bbd40bebd9bef763f3e62b79ac621a76db9330.camel@cybertec.at>
  References: <CAMTZZh2Uawp=WcuYpakbsMuutYS5NewU24otpub--9YYhfV4rA@mail.gmail.com> <60bbd40bebd9bef763f3e62b79ac621a76db9330.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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