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 1qqYJT-00B3pI-Fw for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Oct 2023 12:27:43 +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 1qqYJR-00FrTA-4M for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Oct 2023 12:27:42 +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 1qqYJQ-00FrSJ-Pl for pgsql-hackers@lists.postgresql.org; Wed, 11 Oct 2023 12:27:41 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qqYJO-0019vs-Vi for pgsql-hackers@lists.postgresql.org; Wed, 11 Oct 2023 12:27:40 +0000 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-53de0d1dc46so839111a12.3 for ; Wed, 11 Oct 2023 05:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697027257; x=1697632057; darn=lists.postgresql.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4FdeirjGKX2w/IX9CE4u4aBEKp8QnEY69TpX0/R7Svs=; b=VsJWIKB9rOHh5YPNBpogcXGZsR6ZWEZFqSFyoVLHZLbpQDE6Px1pPJ6UeuON7+vLXG OMN7yZrm2VtKGCgKcpdU1dUpuVqGz64vD2iZpJPbC/s3RRP28uY+bbc1xzZTp4cWCOYv 8SrOAZCiWV54dK9jlfEz114v+H4ReHCgWGYSN0t+hYIUFYLGtMGg6PfFwhxS26q1bCkn rkzpGV5ae10+yhCvxu1E20J9uN6zkV7EZLmxHppT+uzYGHkkOTHwd0UbqH0VLUiihHm8 reX5uHYjzKY06H4PlHj+O3qrzZj9aJRbssjzf5hZwLf7v7OxmGv3GWW2d6BTeJYzLGGh paNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697027257; x=1697632057; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4FdeirjGKX2w/IX9CE4u4aBEKp8QnEY69TpX0/R7Svs=; b=UTfBUYwIGCl6yYbm1Ink/PsNfejXTwLcj3OB9dYFvSOzZIgwHBPF/pvDjm7nuGoEUc 9UwBmfM7O80eLbEqyu4Rk688YIV3DecEP9bWM5GeRfKfe/KKLUzl+mMj6lj113jVbxJQ r2b0ZezF8C/D16xlDtOdLwPLAMNQ1oZLHspQi7zoONkhn+hRbRaSItXiDFPvmpz/mq5i 6wqY7tjSjxvOid5QwKajOuCEuurpSh54MHoR4JjB2BxyAUyA/Rx70uHVK2Zi+rE4bqSa ca79GADboAIGw6mw4Ba69U2ppLv01jBUqIdH4cUkilIlgDOdyCnkR9AatxY8BP5HHbbE uuDw== X-Gm-Message-State: AOJu0Ywt8O/oCVIKuWg/XfbV8R8N/2CALA/QjwX+4RdKM3KLx7xLa11Z O+f7E0j4NGL4aFZXjApGdjRPx+WK/2fmXhV43xWhmkPfltLCIg== X-Google-Smtp-Source: AGHT+IEURLmcNJEtFJXC8RqG7qLItu7HwjITdWjuO6XmbeweI2AKnC83NDAbLb4tJmdU8YFYqqND16LkbvJwYqAE/mQ= X-Received: by 2002:a05:6402:2904:b0:53d:a0c9:dbd4 with SMTP id ee4-20020a056402290400b0053da0c9dbd4mr3137750edb.21.1697027256806; Wed, 11 Oct 2023 05:27:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dilip Kumar Date: Wed, 11 Oct 2023 17:57:20 +0530 Message-ID: Subject: Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock To: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Oct 11, 2023 at 4:34=E2=80=AFPM Dilip Kumar = wrote: > > The small size of the SLRU buffer pools can sometimes become a > performance problem because it=E2=80=99s not difficult to have a workload > where the number of buffers actively in use is larger than the > fixed-size buffer pool. However, just increasing the size of the > buffer pool doesn=E2=80=99t necessarily help, because the linear search t= hat > we use for buffer replacement doesn=E2=80=99t scale, and also because > contention on the single centralized lock limits scalability. > > There is a couple of patches proposed in the past to address the > problem of increasing the buffer pool size, one of the patch [1] was > proposed by Thomas Munro where we make the size of the buffer pool > configurable. In my last email, I forgot to give the link from where I have taken the base path for dividing the buffer pool in banks so giving the same here[1]. And looking at this again it seems that the idea of that patch was from Andrey M. Borodin and the idea of the SLRU scale factor were introduced by Yura Sokolov and Ivan Lazarev. Apologies for missing that in the first email. [1] https://commitfest.postgresql.org/43/2627/ --=20 Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com