Swap on postgres master server

From: Nicola Contu <nicola(dot)contu(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Cc: Alessandro Aste <Alessandro(dot)aste(at)gtt(dot)net>
Subject: Swap on postgres master server
Date: 2018-10-16 09:04:20
Message-ID: CAMTZZh2Uawp=WcuYpakbsMuutYS5NewU24otpub--9YYhfV4rA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
we are running Postgres 10.5 with master slave replication.

These are our custom params

archive_command = 'pgbackrest --stanza=cmdprod archive-push %p' # command
to use to archive a logfile segment
archive_mode = on # enables archiving; off, on, or always
checkpoint_completion_target = 0.7 # checkpoint target duration, 0.0 - 1.0
default_text_search_config = 'pg_catalog.english' #
datestyle = 'iso, mdy' #
effective_cache_size = 120GB #
hot_standby = on # "on" allows queries during
recovery
lc_messages = 'en_US.UTF-8' # locale for system error
message
lc_monetary = 'en_US.UTF-8' # locale for monetary
formatting
lc_numeric = 'en_US.UTF-8' # locale for number
formatting
lc_time = 'en_US.UTF-8' # locale for time
formatting
listen_addresses = '*' # defaults to 'localhost', '*' = all
log_autovacuum_min_duration = 1000ms # -1 disables, 0 logs all
actions and
log_checkpoints = on #
log_line_prefix = '%t [%r] [%p]: [%l-1] db=%d,user=%u ' #
log_lock_waits = on # log lock waits >=
deadlock_timeout
log_min_duration_statement = 1000ms # -1 is disabled, 0 logs all
statements
log_statement = 'ddl' # none, ddl, mod, all
log_temp_files = 1024kB # log temporary files equal or
larger
maintenance_work_mem = 2GB #
max_connections = 220 #
max_parallel_workers_per_gather = 8 # taken from max_worker_processes
max_wal_size = 2GB #
min_wal_size = 1GB #
pg_stat_statements.max = 10000 #
pg_stat_statements.track = all #
port = 5432 # port number which Postgres listen
shared_buffers = 10GB #
shared_preload_libraries = 'pg_stat_statements' # (change requires
restart)
synchronous_standby_names = '1 ( "usnyh2" )' # comment out during upgrade
track_activity_query_size = 16384 # (change requires restart)
track_io_timing = on #
wal_buffers = 16MB #
wal_keep_segments = 100 #
wal_level = replica # minimal, replica, or logical
work_mem = 600MB #

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.

Any trick?

Thanks a lot,
Nicola

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Moreno Andreo 2018-10-16 09:13:31 Re: New tablespace: just an advice
Previous Message Laurenz Albe 2018-10-16 08:18:25 Re: New tablespace: just an advice