Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2ZS5-0003zI-Jm for pgsql-performance@arkaria.postgresql.org; Wed, 19 Sep 2018 10:11:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g2ZS3-0003yI-Ig for pgsql-performance@arkaria.postgresql.org; Wed, 19 Sep 2018 10:11:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2ZS2-0003x6-RM for pgsql-performance@lists.postgresql.org; Wed, 19 Sep 2018 10:11:19 +0000 Received: from mail-it0-x242.google.com ([2607:f8b0:4001:c0b::242]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g2ZRu-0005EX-RL for pgsql-performance@lists.postgresql.org; Wed, 19 Sep 2018 10:11:17 +0000 Received: by mail-it0-x242.google.com with SMTP id h23-v6so6960496ita.5 for ; Wed, 19 Sep 2018 03:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZXCKlkzzHYG0SpoIl1EHoGxrT0cRNn+A8rmDNckBklE=; b=ZDD93iqR/FHJXdPekZ7dOfUg9FLo0vjkv4rTjRR8UuOBQAKp57YvmMf8m3KXzFg43T tVBFZ2U+a1A7g1fU1YLXGjydXXaE/yHrn9jKiTs3vpCGwXclzQVROMGewWesMDiQv/xn sRxNmCN6XkptXWcU5Nlz2TJVneldVYvOf1mO+p76aNJ1Z4UikfyFoy+IG2/yAG3scCQn Bx5hwDyPe9rDfY0JjYYxZfEMI+ttnpicwYjNsrCs2CZETCVrx4cijpOhrsv43hfMfT60 KMZonXwEi4BXqbAXUVOeMPU8CHslBj2h+ZsWoeFrD55PbWHS8wHQilk/SQCfEJP+MZVY aESg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZXCKlkzzHYG0SpoIl1EHoGxrT0cRNn+A8rmDNckBklE=; b=IpDpODqcW+p/Z7gRBF6n1CHudHVZMVFAMQmX/oFgfjIH0LGc0/GIsGK3riiJa/DMbR WVs/qk25DR4YUDUc3rfGxuSu3Naj7asHk9cP26a7Vtm0xxaGNQh3hSOdZONLcU255fHG /Tv8hY9Ng0oOS85i/8rVKzYtWBohv3UL5rRk/kjqXSoeiN29bzC18SYpqX7wXr5Kkdwn yzA16indlfrTLZBJKFjKBrAGaSUZTKPYPEwHRl8jMh8uStrjBbPpg3ftUXdJYIhI2K7T Bw8ihZrPVivP+h4uswglGnilL00jN97fvZ9TxVf1sw4suSRbD1WkpkbAEQFEkEg+sP0H afCQ== X-Gm-Message-State: APzg51Chhc6tLkL+b7q8hewk+F7Ic9oeGo8jJNxhdSmg2+e8Ha7kCBgb XfuL2+B2hDW53V267st524uJAVP/W2ab1B7N2jDZuQ== X-Google-Smtp-Source: ANB0Vdbb1R5mg6fDilftBp4hHNiceb6LWbGS4zK0mQ/DNQsKNRP9cd6FXrO8FpnpdxGhcKchurCx1mY+YE9Biwltql4= X-Received: by 2002:a24:44d7:: with SMTP id o206-v6mr19477165ita.66.1537351869483; Wed, 19 Sep 2018 03:11:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:b478:0:0:0:0:0 with HTTP; Wed, 19 Sep 2018 03:11:08 -0700 (PDT) In-Reply-To: <1476619436.6435500.1537348704720@mail.yahoo.com> References: <1321418371.5650982.1537346138600.ref@mail.yahoo.com> <1321418371.5650982.1537346138600@mail.yahoo.com> <5456011537348252@sas1-fed4e4c8a570.qloud-c.yandex.net> <1476619436.6435500.1537348704720@mail.yahoo.com> From: David Rowley Date: Wed, 19 Sep 2018 22:11:08 +1200 Message-ID: Subject: Re: To keep indexes in memory, is large enough effective_cache_size enough? To: "Sam R." Cc: Sergei Kornilov , "pgsql-performance@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 19 September 2018 at 21:18, Sam R. wrote: > Ok. So, we should set also shared_buffers big. It might not be quite as beneficial as you might think. If your database is larger than RAM often having a smaller shared_buffers setting yields better performance. The reason is that if you have a very large shared_buffers that the same buffers can end up cached in the kernel page cache and shared buffers. If you have a smaller shared buffers setting then the chances of that double buffering are reduced and the chances of finding a page cached somewhere increases. However, if your database is quite small and you can afford to fit all your data in shared buffers, with enough free RAM for everything else, then you might benefit from a large shared buffers, but it's important to also consider that some operations, such as DROP TABLE can become slow of shared buffers is very large. You might get more specific recommendations if you mention how much RAM the server has and how big the data is now and will be in the future. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services