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 1u3KYI-00EAQa-MI for pgsql-performance@arkaria.postgresql.org; Fri, 11 Apr 2025 20:00:38 +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 1u3KXH-00DhPp-FP for pgsql-performance@arkaria.postgresql.org; Fri, 11 Apr 2025 19:59:35 +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 1u3KXH-00DhPh-43 for pgsql-performance@lists.postgresql.org; Fri, 11 Apr 2025 19:59:35 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u3KXF-004Lcc-18 for pgsql-performance@lists.postgresql.org; Fri, 11 Apr 2025 19:59:34 +0000 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5e5bc066283so3851932a12.0 for ; Fri, 11 Apr 2025 12:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1744401571; x=1745006371; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=mhAti/IcIy4ptvmRc2y+NfnvTNUuXM8a8789G6X4lWY=; b=SRD9sTJhFgZPJV+TMgOdQM3+XwCpdvHi9LrdgCpKRg0iiCsTdEX+fUD/J66YWessLi RE9IlsgtwBuS04ROpYAMG0vVWQMC1Z52ByekM99L2Qy3oF0UDsVSJ14gk47lNApuSP7V iaVwRu2fEMQ4P0TPyqmKyMgwnDWt1/rLpQol3XRc9PInpDGAjH3ZfhR9kM51Y1JhMbQW jx5Vt4yZzSriH+bil5sub5flwpYyoR5h4EY++FXo7psksOyajOnjaDRtmBGM8dvRm93+ CZTSOpIn8MIK+rs1rAiAkFn5It10eHXIX4Y6mKU8F4/MlO5vqLCzkv0Yim/qJiOEdjvZ +UKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744401571; x=1745006371; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mhAti/IcIy4ptvmRc2y+NfnvTNUuXM8a8789G6X4lWY=; b=qxv2WXEqetas3CFE26gaecDOTuo693/uV3TTYKukzRXfsfGOHF+54B50dXZGd07VW5 WU03GO7isJ5Lb/bpvlW5kC3gld1reYLkOT3RknXT8g/uT7q5OckQ+l+bLa4s6Yd1pqQc g7GRsS4L0Rj+RIyUHScCoMYhb8GlsUY5YIOS9YTxSw2IsKx3fkmSGoB7j6loB8DVRVtS CYUyLOub7OW/G+g0aKpM404s60RrAc4UeIJl5Y38Zgr3cCgoKXBQvBgCvNicTm41YrLz 6vIZPJgeaD7MZ2ksGt/G41radcH64Yk7UUilYvMwBZ3IUobFNyKyKFUcokQbVJl/ewG9 uA4Q== X-Forwarded-Encrypted: i=1; AJvYcCWIs1Ano1rW/v4W75yYbdfzerFdi5yW6DEFLoch3iUP0LtDQWY88LXF777QoZ3kc6u6NxN8UU5EORQsq+MgmmdFHQ==@lists.postgresql.org X-Gm-Message-State: AOJu0YxAkbAOklvlGc7ec3GeM5smgCQg8gY3Izy74omj9WzjLuGSxcBe CueAgjs5OgsG/lR8zZ33HdTNQsk6ynfBWaGXJ3uzjTDGyv/bopmW2Qb51B5KJra/vYj57vv5zck UnAQ= X-Gm-Gg: ASbGnctDKwCAm8IGNMtSohyscYkN99IS+0rGEWQ5bTPAysWz583PZPJPemxv6bHXoHq wtGeiUxl16DIDXB06NsThs9rTAQLeGlKhR5KyRVSemklupkzs5zH77EZCkFOcj0j1LvTa8MsYfu GDGYp0JGt4+oBmR5ybR39bUtxF1LQ1w8YzXCUXu0uvukD1f//iJqSk2xo+JC4CpKzneg2IXG0XJ DKu7bGErZEXl6zh0DYkX34n9i0hZlVs81idIH6eqQbb9Ino8ycDjBdwpKzAv3zv5Klj833XA1fs 4gDQLtsy5XvwWJxul2SMhuJfSMh8UkHOFReHlzIOOLZjpYuZJ171XR6MbyWAiA== X-Google-Smtp-Source: AGHT+IEwlGOjvZD6ng4hwGFen2uicWetdMODSw8EvZQLbzssNvwCpWWEFIuJJamsbf+e1F6djkGx/A== X-Received: by 2002:a05:6402:518b:b0:5e5:e396:3f9a with SMTP id 4fb4d7f45d1cf-5f36fefecdcmr2700906a12.31.1744401570859; Fri, 11 Apr 2025 12:59:30 -0700 (PDT) Received: from localhost.localdomain ([2001:871:255:52d3:3ac8:61ab:b634:342]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5f36f528bb7sm1394719a12.77.2025.04.11.12.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Apr 2025 12:59:30 -0700 (PDT) Message-ID: Subject: Re: many sessions wait on LWlock WALWrite suddenly From: Laurenz Albe To: James Pang , pgsql-performance@lists.postgresql.org Date: Fri, 11 Apr 2025 21:59:29 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2025-04-11 at 22:36 +0800, James Pang wrote: > pgv14.8 , during peak time, we suddenly see hundreds of active sessions w= aiting on LWlock > WALWrite at the same time, but we did not find any issue on storage . > any suggestions ?=C2=A0 You should get a reasonably sized (much smaller) connection pool. That will probably take care of the problem and will probably improve your overall performance. Yours, Laurenz Albe