Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eqwvQ-00076C-VP for pgsql-admin@arkaria.postgresql.org; Wed, 28 Feb 2018 08:17:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eqwvQ-0001po-0r for pgsql-admin@arkaria.postgresql.org; Wed, 28 Feb 2018 08:17:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eqwvP-0001pf-FU for pgsql-admin@lists.postgresql.org; Wed, 28 Feb 2018 08:17:19 +0000 Received: from sender-op-o11.zoho.com ([135.84.80.196]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eqwvM-0002xn-DT for pgsql-admin@lists.postgresql.org; Wed, 28 Feb 2018 08:17:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1519805828; s=mail; d=ibc.it; i=dcora@ibc.it; h=Subject:To:References:Cc:From:Date:MIME-Version:In-Reply-To:Content-Type:Message-ID; l=22510; bh=zJAZMQKhXPxfBlIFt61XXrdEWMUO0J7skoWH405384E=; b=PN8UzDAkc8ic1q7iluC8so3+U5xzJOSqZzzSZTxQfvCA5lK0P2GPlm39ve5oAWMG 9+kA38JVC6g1tpxVrMTK1oorFBHP+3Ve2V7BwsehUiUUTh33k6gsTdQ92uU/yIVZy0t fHkPzSxd5abr3nxNai8j1DB/CMC318dzU895x8H0= Received: from [192.168.0.154] (93-57-80-6.ip163.fastwebnet.it [93.57.80.6]) by mx.zohomail.com with SMTPS id 1519805828700637.7889811900484; Wed, 28 Feb 2018 00:17:08 -0800 (PST) Subject: Re: Huge swap usage To: m.digirolamo@tecnodata-srl.it References: <2065222564.10906501.1519731937672.JavaMail.zimbra@tecnodata-srl.it> Cc: pgsql-admin@lists.postgresql.org From: =?UTF-8?Q?Denis_Cor=c3=a0?= Organization: IBC s.r.l. Date: Wed, 28 Feb 2018 09:17:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <2065222564.10906501.1519731937672.JavaMail.zimbra@tecnodata-srl.it> Content-Type: multipart/alternative; boundary="------------14EAFBC0EF422095D1F7E247" Content-Language: it-IT Message-ID: X-ZohoMail: Z_656302832 SPT_1 Z_36248130 SPT_1 SLF_D List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------14EAFBC0EF422095D1F7E247 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable hi Mariano, use smem (epel repository) to find process use swap; on dedicate server,=20 i think you can set swappiness to 5 Denis Il 27/02/2018 12:45, Mariano Di Girolamo ha scritto: > Hi to all, > I have a virtual server centos 7.3=C2=A0with posgres 9.5.7 and I have a= =20 > problem with huge swap usage. > In this moment I have 0 GB of free swap and 6,5 GB of RAM free. > My swappiness is set to 30 (as default) and the page size is 4 kB. > Is there someone that can help me to solve the problem? > Below my server configuration. > > Thanks > > --------------------- > Centos=C2=A07.3.1611 > vCPU: 4 > RAM: 16 GB > SWAP: 4GB > Postgresql: 9.5.7 > > ## custom section of postgresql.conf ## > port =3D 5432 > max_connections =3D 250 > shared_buffers =3D 4GB > maintenance_work_mem =3D 512MB > checkpoint_timeout =3D 30min > escape_string_warning =3D off > standard_conforming_strings =3D off > work_mem =3D 32MB > effective_cache_size =3D 4GB > max_wal_senders =3D 10 > log_parser_stats =3D on > log_planner_stats =3D on > log_executor_stats =3D on > log_statement_stats =3D on > log_autovacuum_min_duration =3D 216000000 > > > > > > /*Mariano Di Girolamo*/ > cell. +39 329 0552286 > tel. +39 0735 7626263 > email: m.digirolamo@tecnodata-srl.it=20 > > > Tecnodata s.r.l. - Via Val Tiberina, 23A - 63074 San Benedetto del=20 > Tronto (AP) Italy > tel. +39 0735 7626261 =C2=A0-=20 > www.tecnodata-srl.it > Il contenuto di questa e-mail e degli eventuali allegati, =C3=A8=20 > strettamente confidenziale, non producibile in giudizio e destinato=20 > alla/e persona/e a cui =C3=A8 indirizzato. Se avete ricevuto per errore= =20 > questa e-mail, Vi preghiamo di segnalarcelo immediatamente e di=20 > cancellarla dal vostro computer. E' fatto divieto di copiare e=20 > divulgare il contenuto di questa e-mail. Ogni utilizzo abusivo delle=20 > informazioni qui contenute da parte di persone terze o comunque non=20 > indicate nella presente e-mail, potr=C3=A0 essere perseguito ai sensi di = legge. --------------14EAFBC0EF422095D1F7E247 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

hi Mariano,

use smem (epel repository) to find process use swap; on dedicate server, i think you can set swappiness to 5

Denis


Il 27/02/2018 12:45, Mariano Di Girolamo ha scritto:
Hi to all,
I have a virtual server centos=C2=A07.3= =C2=A0with posgres=C2=A09.5.7 and=C2=A0I have a problem with huge swap usage.
In this moment I have 0 GB of free swap and 6,5 GB of RAM free.
My swappiness is set to 30 (as default) and the page size is 4 kB.
Is there someone that can help me to solve the problem?
Below my server configuration.

Thanks

---------------------
Centos=C2=A07.3.1611
vCPU: 4
RAM: 16 GB
SWAP: 4GB
Postgresql: 9.5.7

## custom section of postgresql.conf ##
port =3D 5432
max_connections =3D 250
shared_buffers =3D 4GB
maintenance_work_mem =3D 512MB
checkpoint_timeout =3D 30min
escape_string_warning =3D off
standard_conforming_strings =3D off
work_mem =3D 32MB
effective_cache_size =3D 4GB
max_wal_senders =3D 10
log_parser_stats =3D on
log_planner_stats =3D on
log_executor_stats =3D on
log_statement_stats =3D on
log_autovacuum_min_duration =3D 216000000





Tecnodata s.r.l. - Via Val Tiberina, 23A - 63074 San Benedetto del Tronto (AP) Italy
Il contenuto di questa e-mail e degli eventuali allegati, =C3=A8 strettamen= te confidenziale, non producibile in giudizio e destinato alla/e persona/e a cui =C3=A8 indirizzato. Se avete ricevut= o per errore questa e-mail, Vi preghiamo di segnalarcelo immediatamente e di cancellarla dal vostro computer. E' fatto divieto di copiare e divulgare il contenuto di questa e-mail. Ogni utilizzo abusivo delle informazioni qui contenute da parte di persone terze o comunque non indicate nella presente e-mail, potr=C3=A0 essere perseguit= o ai sensi di legge.

--------------14EAFBC0EF422095D1F7E247--