Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcZZV-0000tb-CH for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Nov 2020 19:44:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcZZT-0005Lv-NG for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Nov 2020 19:44:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcZZT-0005Lo-HL for pgsql-bugs@lists.postgresql.org; Tue, 10 Nov 2020 19:44:51 +0000 Received: from excelsior.roeckx.be ([2a05:7300:0:100::3]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcZZR-0000wM-HY for pgsql-bugs@lists.postgresql.org; Tue, 10 Nov 2020 19:44:51 +0000 Received: from intrepid.roeckx.be (localhost [127.0.0.1]) by excelsior.roeckx.be (Postfix) with ESMTP id 3B4C6A8A010D; Tue, 10 Nov 2020 19:44:47 +0000 (UTC) Received: by intrepid.roeckx.be (Postfix, from userid 1000) id 03C3A1FE0DC8; Tue, 10 Nov 2020 20:44:46 +0100 (CET) Date: Tue, 10 Nov 2020 20:44:46 +0100 From: Kurt Roeckx To: Andres Freund Cc: Tom Lane , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16707: Memory leak Message-ID: <20201110194446.GA566206@roeckx.be> References: <16707-f5df308978a55bf8@postgresql.org> <1999972.1604957673@sss.pgh.pa.us> <20201109220329.GC391173@roeckx.be> <2002012.1604960437@sss.pgh.pa.us> <20201110043127.sfkyvvjqy7x3er5k@alap3.anarazel.de> <20201110081120.GF391173@roeckx.be> <20201110081934.GA546675@roeckx.be> <20201110173948.GA562081@roeckx.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201110173948.GA562081@roeckx.be> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I took a copy of /proc/$pid/smaps about 2 hours apart, and a diff shows: -5604495f1000-5604886fd000 rw-p 00000000 00:00 0 [heap] -Size: 1033264 kB +5604495f1000-56048cc1c000 rw-p 00000000 00:00 0 [heap] +Size: 1104044 kB KernelPageSize: 4 kB MMUPageSize: 4 kB -Rss: 1030296 kB -Pss: 1030296 kB +Rss: 1101288 kB +Pss: 1101288 kB Shared_Clean: 0 kB Shared_Dirty: 0 kB Private_Clean: 0 kB -Private_Dirty: 1030296 kB -Referenced: 998992 kB -Anonymous: 1030296 kB +Private_Dirty: 1101288 kB +Referenced: 1067220 kB +Anonymous: 1101288 kB LazyFree: 0 kB AnonHugePages: 0 kB ShmemPmdMapped: 0 kB So the heap grew with 70 MB. The new results from status: VmPeak: 5928312 kB VmSize: 5928056 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 5772336 kB VmRSS: 5772084 kB RssAnon: 1485980 kB RssFile: 27472 kB RssShmem: 4258632 kB VmData: 1483776 kB VmStk: 132 kB VmExe: 5388 kB VmLib: 68200 kB VmPTE: 11512 kB VmSwap: 0 kB HugetlbPages: 0 kB Both seem to say that the heap grew with 70 MB in about 2 hours. With 10 processes growing at this rate, it grows with about 8 GB a day. Kurt