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 1pxz0I-0001Bm-Dc for pgsql-admin@arkaria.postgresql.org; Sat, 13 May 2023 23:50:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pxz0F-0004T4-7S for pgsql-admin@arkaria.postgresql.org; Sat, 13 May 2023 23:50:19 +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 1pxz0E-0004Sv-Ps for pgsql-admin@lists.postgresql.org; Sat, 13 May 2023 23:50:18 +0000 Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pxz06-002a37-Mr for pgsql-admin@lists.postgresql.org; Sat, 13 May 2023 23:50:17 +0000 Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-b9a6eec8611so52518652276.0 for ; Sat, 13 May 2023 16:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evaristesys-com.20221208.gappssmtp.com; s=20221208; t=1684021809; x=1686613809; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=p1mIZPOJY26/Wd6ORA+VAYgXQsoACV1YK8KHT2eNcsI=; b=lRDi882+zZYyK3v4drN7yDz+uidvRPLL64vy0U1hdoGdGueFiJAFfIT/L78BqQEmLs 2e+2KqZpwJtr+KNyVo57SV2P/+6O5xUWyDhxz6WSs+7N0g35lJedPem9TZegF+om0aaP x5k+myTt2xObyDhK5pLrUx4KAAIlpdyvKLB17KhaE5IVHuUyhBezPX5BIz7E24cxQO8d OE/0XTUKjcyHPkUZ5yK191BLjkPIccikIyYsrDSIF2hHp6aGejIb3ZnPbIUqIU8X28JS Rxtzj1AVysIEnCTiz6c7f6r17y4VnWr0VymAodta0TSJAH+UlILpsB4nEtAPfXzmnVEg lRiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684021809; x=1686613809; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p1mIZPOJY26/Wd6ORA+VAYgXQsoACV1YK8KHT2eNcsI=; b=j3nbxj1ic+MRTxi8/WGjX2AybSiA0eTPYNA4/ifX37yPrSW1ARpk+AU2aZdfb6ehkX YnLfotVKNIGx8Jo8xUdVy6D8eG2NSyiOoK+E1qg9LTIbGQzXKK2kqTRlRueDviY7b2GV iddlgevL9VTIABH5SAM3Ccn/aJq+yuGIWMa3GXw6A46019ZWCglgrfdG6h9gahlevNmI KUfHuASy67prHtwPyPBFPHuwOZ1XKrfSQTFllPFPh1cZc8weNQQCOHggsfTsgF46jADk DiYpSWSULMHNCILumgHtDX9nY2fTE3ssVAto/v2NKJ1L9mncz6KYV8jxpxnDM63aGBo7 7Ttg== X-Gm-Message-State: AC+VfDwJvboOBK2NaXiI9b3i0WBt1O1zfSgsx3gKhhZgrYQvNEdpI2W8 kQ2jzbG55iP1RCxIgKKAkZofr+jxuwZsiMtZFV4= X-Google-Smtp-Source: ACHHUZ5yJ+zT6kAm+lgnBv2l4gEN2QuC3yaNIrHyULi58xqOm3/iwD/sYK9fpO4B3B9JxhAJtWbF7Q== X-Received: by 2002:a25:d8cd:0:b0:b94:bbf2:19a3 with SMTP id p196-20020a25d8cd000000b00b94bbf219a3mr26774096ybg.18.1684021809144; Sat, 13 May 2023 16:50:09 -0700 (PDT) Received: from smtpclient.apple (99-97-91-220.lightspeed.tukrga.sbcglobal.net. [99.97.91.220]) by smtp.gmail.com with ESMTPSA id u185-20020a8160c2000000b00552ccda9bb3sm6744441ywb.92.2023.05.13.16.50.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2023 16:50:08 -0700 (PDT) From: Alex Balashov Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: Unexplained rapid growth in memory usage of idle backends Date: Sat, 13 May 2023 19:49:58 -0400 References: <2D17E15D-8D5B-4DF7-A238-12455C2731D8@evaristesys.com> <1634073.1683942775@sss.pgh.pa.us> To: Tom Lane , pgsql-admin In-Reply-To: <1634073.1683942775@sss.pgh.pa.us> Message-Id: <9844F4CE-A754-4C31-9CA0-EEF80EB6D747@evaristesys.com> X-Mailer: Apple Mail (2.3731.500.231) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On May 12, 2023, at 9:52 PM, Tom Lane wrote: >=20 > Alex Balashov writes: >> Occasionally, about once every 2 months, we'll get a slow-motion = implosion over a period of about 24 hours, where the resident memory = size of some of the backends shoots up from a reasonable few hundred MB = to several gigs -- and will keep growing, e.g. >=20 > I'm a little suspicious that the excess memory consumption is a > consequence of JIT-compiled code not getting recycled promptly. > Do you have JIT enabled, and if so are you relying on it too much > to turn it off? >=20 > I don't have any concrete idea of why JIT code management would work > fine and then stop working fine, but we do have other reports of > memory leaks from that. Hi Tom, thanks for your response. JIT is enabled, but I'm not familiar = with this feature and not sure what we are using which would touch JIT = somehow.=20 Also, am I wrong to imagine that a memory leak would leak memory = gradually over time, rather than to be set off at some arbitrary point = by the same exact workload that has been visited upon the database for = the previous 1-2 months hitherto? -- Alex --=20 Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800