Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJdud-0001b0-L3 for pgsql-docs@arkaria.postgresql.org; Mon, 05 Nov 2018 12:23:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJdua-00069Q-D1 for pgsql-docs@arkaria.postgresql.org; Mon, 05 Nov 2018 12:23:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJdua-00069J-5C for pgsql-docs@lists.postgresql.org; Mon, 05 Nov 2018 12:23:20 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gJduY-00063g-1S for pgsql-docs@lists.postgresql.org; Mon, 05 Nov 2018 12:23:19 +0000 Received: by mail-wm1-x343.google.com with SMTP id q12-v6so7888770wmq.0 for ; Mon, 05 Nov 2018 04:23:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=soiVxlN0agT3iaw/K1q3YP4WY+yrVwf3d1T5ZNW5YOQ=; b=gcHwAwKnCqjOAmPJ5WtEWEKsF1O9IcD3bT15igjlG+KBZVzQcA6VqSW8kfvEwUomYX be1fs3xbiOkOmivy6p6+O/OcBTQEd7rr/lIHtvUL6pRO4W41bPuyBFRtSI0pJMLkLTXO 0S+kKfDn/Pf5+3xE3v1wlFnYP1TAsXZxT9OkzsIysJTYCsXJ8+fQ1VpnzrMGXVi755Cx qGM+Nk26SkGxtsL+Ws6Oti60kG2b1UEvgxSfy1gi1Q3375KtuYk6f/6vrIFIkQbzzDto WaIB+dKepYJpAqFknGzPk/9bWPNa8S4ObK19UQOrmF316WuXaP5BY/7a5CVCIPkPJkIT j5hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=soiVxlN0agT3iaw/K1q3YP4WY+yrVwf3d1T5ZNW5YOQ=; b=GQ5WdzFcsl5Cq3e9WLB7eI/gaomqb2BwwyyJJiaYn04/7x9HsNAMBsJh8skIEnbZX7 g2h9Kq4cukKe6G6nJ8FiLfuSJgyALyKOoc0Zxv1FEuIUCKLJNxExd8RRiliRaw/rtuX0 4AjcakBteFBCs94zbSXzPJXFPxK0vdsVjaCD9MrlZU3U+2LFbGU++ORmcrnrNuGU6XrV FaVxnXko7gyM7S/O7+7SW8vHWxZMxApjO71qmY1bvQI1CoHxWm2wvU3TZx7pjYAKksY/ 5PP1agMJzO4sKjSM2S108dxvVJ9Ki6CJwoU0dRA9yQHhHPrSVrvBmpkSLpBopiYyJtsZ ft3g== X-Gm-Message-State: AGRZ1gL1XyGwCZAAEOx2acjsCORLL7XjWoOH9gaVzhAqDaNjEL/xauL5 LYEyp2xZFs0OmaDcaIb3ONC6OSJeRLsE2iwi6Yk= X-Google-Smtp-Source: AJdET5cUnCi4CQlMHmPTVThzIvne/83cFnUlDCr/v8512/IK+L7xYErbDmrkVCsWX9ekUoSHFA+Mo4/edOPTVvMr5/M= X-Received: by 2002:a1c:2846:: with SMTP id o67-v6mr1081337wmo.102.1541420596248; Mon, 05 Nov 2018 04:23:16 -0800 (PST) MIME-Version: 1.0 References: <153685164808.22334.15432535018443165207@wrigleys.postgresql.org> <20181011174849.GC7807@momjian.us> <20181016153820.GD31154@momjian.us> <369ec766-b947-51bd-4dad-6fb9e026439f@2ndquadrant.com> <20181105120104.GA13769@momjian.us> In-Reply-To: <20181105120104.GA13769@momjian.us> From: Nikolay Samokhvalov Date: Mon, 5 Nov 2018 15:23:03 +0300 Message-ID: Subject: Re: effective_cache_size To: Bruce Momjian Cc: peter.eisentraut@2ndquadrant.com, nat@makarevitch.org, pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000016c4430579e9f359" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000016c4430579e9f359 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 5, 2018 at 3:01 PM Bruce Momjian wrote: > > > {"effective_cache_size", PGC_USERSET, QUERY_TUNING_COST, > > > - gettext_noop("Sets the planner's assumption about > the size of the disk cache."), > > > - gettext_noop("That is, the portion of the kernel'= s > disk cache that " > > > - "will be used for > PostgreSQL data files. This is measured in disk " > > > - "pages, which are > normally 8 kB each."), > > > + gettext_noop("Sets the planner's assumption about > the size of the data cache."), > > > + gettext_noop("That is, the size of the cache used > for PostgreSQL data files. " > > > + "This is measured in dis= k > pages, which are normally 8 kB each."), > ... > Well, the change as outlined in the email is that effective_cache_size > is a combination of shared_buffers and kernel cache size, which I think > the docs now make clear. Do you have better wording for the GUC? > Maybe it's better to use this phrase, "a combination of shared_buffers and kernel cache size"? Or: "a combination of shared_buffers and estimated kernel cache size". The phrase "the size of the cache" might be very confusing indeed =E2=80=93= it sounds like it's about some single cache, while it's about the combination of two. Maybe it's also worth to mention that the fact that some pages might be cached twice =E2=80=93 in OS cache + in Postgres shared buffers =E2=80=93 should be ignored, when = choosing the proper value for effective_cache_size? I think this would finally eliminate the possibility of confusion. I see now, the docs chapter "19.7. Query Planning" has "some data might exist in both places" =E2=80=93 this is great, since confusion here is not uncommon. It's worth t= o propagate this change everywhere where effective_cache_size is explained. Nik --00000000000016c4430579e9f359 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Nov 5, 2018 at 3:01 PM Bruce Momjian &l= t;bruce@momjian.us> wrote:
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{"effective_c= ache_size", PGC_USERSET, QUERY_TUNING_COST,
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0gettext_noop("Sets the planner's assumption about the size o= f the disk cache."),
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0gettext_noop("That is, the portion of the kernel's disk cach= e that "
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 "will be used for PostgreSQL data files. This is mea= sured in disk "
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 "pages, which are normally 8 kB each."),
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0gettext_noop("Sets the planner's assumption about the size o= f the data cache."),
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0gettext_noop("That is, the size of the cache used for PostgreSQL= data files. "
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 "This is measured in disk pages, which are normally = 8 kB each."),
Well, the change as outlined in the email is that effective_cache_size
is a combination of shared_buffers and kernel cache size, which I think
the docs now make clear.=C2=A0 Do you have better wording for the GUC?
<= /blockquote>

Maybe it's better to use this phrase, &= quot;a combination of shared_buffers and kernel cache size"?
Or: "a combination of shared_buffers and estimated kernel cache size&= quot;.



--00000000000016c4430579e9f359--