Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sg64N-00FIdG-7C for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Aug 2024 17:21:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sg63M-000mqA-5t for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Aug 2024 17:20:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sg63L-000mq2-SS for pgsql-bugs@lists.postgresql.org; Mon, 19 Aug 2024 17:20:24 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sg63J-000RIa-RF for pgsql-bugs@lists.postgresql.org; Mon, 19 Aug 2024 17:20:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=P3dMQLITPSBTs8Ywv3QK3HsXm6fdRHP52FwLB5f42Qo=; b=KADaaNAP9mryasImkS29Fis2f4 VwRdpiwmTEwjcjdpKiBaZaXAyaPcIrNpgc+fUiXEMPmnk0QDlx9Dk5GT9zaGrt88GTUelFKvgF2H2 yY3ujeTA/BR/vIfN+58kZNeqIFTFU/DumznGYRCtySSpYbxl/0Yeoov50cCV4iYIsEYVZDXLSeInr FsM+fLkBlFvTqx4EBAyIa6RUt8+U0fu8+0QziQxC5bmSE8WMs8N5Qeo7IFsD5FvpYfj6JEwmNSk6z GITud4vS2jHZJJ4ewsWY2Dwynl/4USnpdNC8lr9YlMujmGd6vh0BGioG4vUyQdGqajXk0k0m/gUuW QYoWihRA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1sg63I-00D29z-0J; Mon, 19 Aug 2024 13:20:20 -0400 Date: Mon, 19 Aug 2024 13:20:20 -0400 From: Bruce Momjian To: Aleksander Alekseev Cc: "pgsql-bugs@lists.postgresql.org" , Mohammed Siddiqui , Ken Sollars , Matt Elliott Subject: Re: Intermittent aggressive use of SWAP space by PostgreSQL despite availability of HUGE amounts of RAM for a small database. Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jul 23, 2024 at 11:33:05AM +0300, Aleksander Alekseev wrote: > Hi, > > > We have been seeing intermittent aggressive use of SWAP space by PostgreSQL despite availability of HUGE amounts of free RAM. We have a 100 GB database with 256 GB RAM on the server so there is no shortage of RAM nor shortage in PostgreSQL buffer cache. Our swappiness setting is set to “1”. > > [...] > > Please provide your postgresql.conf. I find running this query more helpful because it only shows non-default settings, and potentially shows per user/database changes too: -- show non-default server settings SELECT name, current_setting(name), source FROM pg_settings WHERE source NOT IN ('default', 'override'); -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.