Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVINO-00058G-4M for pgsql-performance@arkaria.postgresql.org; Wed, 12 Jul 2017 14:12:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dVINN-0002zJ-Mq for pgsql-performance@arkaria.postgresql.org; Wed, 12 Jul 2017 14:12:25 +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.84_2) (envelope-from ) id 1dVILY-0001VL-Bm for pgsql-performance@postgresql.org; Wed, 12 Jul 2017 14:10:32 +0000 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dVILV-0006Pw-Hk for pgsql-performance@postgresql.org; Wed, 12 Jul 2017 14:10:31 +0000 Received: by mail-qk0-x229.google.com with SMTP id a66so11150690qkb.0 for ; Wed, 12 Jul 2017 07:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kLsajviCfVhzJmXDlAKm3GuhDfdn6rbntZMmmFFRzK4=; b=MFOwQcQFc51bLqkK10b38umaH6l/txcDjaM7w4qeDOtnvm8kihaGChSFyUhoa8ms5d hiW9twj7VpueZfQZ7ADUBRXvSHH3rW1O+jX8zsb9EIcGj3R99TxbcpsFx45cRL3f/U5y YxNEEIpbXDO+pFj8pmJhWAebdLmqExbQjy3UgysJWiSAqBFPLWFwDcv9OCFcPZmvwKSD OgVBfYKU5BsVU4YjAUm+JsU3yJ6qk6s0cQJYSbuZo462oNtkMYFvXJqfdXl7kjP6MFp5 w90CLo/Pb4yRmaGoUv1lG2wlibvVoePN9B5VczyljFInMHZjyAagYaJBJDk4HIZDN+7g DmiQ== 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=kLsajviCfVhzJmXDlAKm3GuhDfdn6rbntZMmmFFRzK4=; b=Pf3VVV4P70qPB81RWZZ4wsmJye9+KtpvFzdjD67W+h+98gZGXzKEotctIivZ9jUaCR SU/dViO9Nbk3TI4xIhdUwiqElNQbcf0gqGvQlQSlnEUT/w2dGPrOz1oe16r5K8Yy0eQa YvKNjy05vhHD3Zd1OunOreVw4SBkBbJD2Sym/LYh/X9Ran+3z4NeNXds98ZXzxSMKVHQ 0oBTIR8T0v/92XnqBBwX6nw/yITQ69UBvpMPUMXMcHG3/tiGaK0Q12oOmTyeUvhpiyYc 4u/vYjYXsEYoNoeZiIBx8J3RC2lc64m3OT6ojJPHAYm8OYOKuCmrBbwyLxhSfJDQd3Gk eLjg== X-Gm-Message-State: AIVw110FPT9h5sEH15SEmhiuBOLVw8oGnQCxWkJO7maxPpS/M7DUN7Ib aUN3Tg2zwg+2RBfRZXQXfviVKM6Qjw== X-Received: by 10.55.40.13 with SMTP id o13mr5951891qkh.116.1499868628139; Wed, 12 Jul 2017 07:10:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.177.40 with HTTP; Wed, 12 Jul 2017 07:10:27 -0700 (PDT) In-Reply-To: References: From: Rick Otten Date: Wed, 12 Jul 2017 10:10:27 -0400 Message-ID: Subject: Re: Very poor read performance, query independent To: Charles Nadeau Cc: "pgsql-performa." Content-Type: multipart/alternative; boundary="001a11441568ca46c505541f60d6" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --001a11441568ca46c505541f60d6 Content-Type: text/plain; charset="UTF-8" On Wed, Jul 12, 2017 at 9:38 AM, Charles Nadeau wrote: > Rick, > > Should the number of page should always be correlated to the VmPeak of the > postmaster or could it be set to reflect shared_buffer or another setting? > Thanks! > > The documentation implies that you may need to adjust its size when you change shared_buffer settings. I usually check it every now and then (I haven't build a formal monitor yet.) to see if all of the huge pages are free/used and if it looks like they are all getting consumed - consider bumping it higher. If there are lots free, you are probably fine. cat /proc/meminfo | grep -i "^huge" -- Also regarding my note on effective_io_concurrency, which I'm not sure you tried tweaking yet. With file system and hardware caching between you and your spindles, your best setting for effective_io_concurrency may be much higher than the actual number of spindles. It is worth experimenting with. If you can, try several values. You can use pg_bench to put consistent workloads on your database for measurement purposes. Charles > > On Mon, Jul 10, 2017 at 5:25 PM, Rick Otten > wrote: > >> Although probably not the root cause, at the least I would set up >> hugepages ( https://www.postgresql.org/docs/9.6/static/kernel-resourc >> es.html#LINUX-HUGE-PAGES ), and bump effective_io_concurrency up quite a >> bit as well (256 ?). >> >> --001a11441568ca46c505541f60d6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Jul 12, 2017 at 9:38 AM, Charles Nadeau <<= a href=3D"mailto:charles.nadeau@gmail.com" target=3D"_blank">charles.nadeau= @gmail.com> wrote:
Rick,

Should the = number of page should always be correlated to the VmPeak of the postmaster = or could it be set to reflect shared_buffer or another setting?
T= hanks!


The docum= entation implies that you may need to adjust its size when you change share= d_buffer settings.=C2=A0

I usually check it every = now and then (I haven't build a formal monitor yet.) to see if all of t= he huge pages are free/used and if it looks like they are all getting consu= med - consider bumping it higher.=C2=A0 If there are lots free, you are pro= bably fine.

cat /proc/meminfo | grep -i "^hug= e"

--

Also regar= ding my note on effective_io_concurrency, which I'm not sure you tried = tweaking yet.

With file system and hardware cachin= g between you and your spindles, your best setting for effective_io_concurr= ency may be much higher than the actual number of spindles. =C2=A0 It is wo= rth experimenting with. =C2=A0 If you can, try several values.=C2=A0 You ca= n use pg_bench to put consistent workloads on your database for measurement= purposes.


Charles

On Mon, Jul 10, 201= 7 at 5:25 PM, Rick Otten <rottenwindfish@gmail.com> w= rote:
Although probably not the root cause, at the least I would set up hugepage= s =C2=A0(=C2=A0https://www.postgresql.= org/docs/9.6/static/kernel-resources.html#LINUX-HUGE-PAGES ),= and bump effective_io_concurrency up quite a bit as well (256 ?).

=
--001a11441568ca46c505541f60d6--