Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYOXv-0007uu-22 for pgsql-docs@arkaria.postgresql.org; Thu, 07 Oct 2021 08:14:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYOXs-0005OL-UP for pgsql-docs@arkaria.postgresql.org; Thu, 07 Oct 2021 08:14:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYOXr-0005OD-TZ for pgsql-docs@lists.postgresql.org; Thu, 07 Oct 2021 08:14:28 +0000 Received: from sonic308-19.consmr.mail.sg3.yahoo.com ([106.10.241.209]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mYOXp-0006cw-1N for pgsql-docs@lists.postgresql.org; Thu, 07 Oct 2021 08:14:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.in; s=s2048; t=1633594459; bh=YvgOsOPJeOY0i/DiUxFU2znYhwYDDAK6KVJ1UeuNd/s=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=cDNVcdDGjqB2Qq5b06jbIs9SdxETT5zQbB9Ny6gGucXa8jffYKMpQYqvAkivvSHxv21ivSRZYjmoSoZH1th4zU4pgHruTMQ51gR5Bks4Djv5PTIuFTkLt63puz0o6xrT6c8pWQ7LhXXdtI9QfFjjr1V1SmgX5c+2WREivsDFKzJIVcPLwrD18RqxQ9lfXLw3Jg00kBSvn7iCCr4jOr/d1M8SAuj/fTTVtXZWYRj04QYBNahTfaJbghsfn31q3EQ3SNukPZKiqVG4P5eCf0OXSsjaoRB0r9KwEiZjM2Px/i/RDrCsXOwXIcAJak7pI9QB78bW1bPYJPRvukCfQyu5hg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1633594459; bh=g6Q8IC7SI2BtSt5pKzuuD69is0YwASHEkCvus3EAuaE=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=I+ytqYJN0LLdtFsAghNhhCjEW+k2vc3AhOV+eR1cUCqdY0Cz4KO6WbpFwtQxtI415dg6RgZnBNIRxDZaIxKJl+XtkwDzbxewnQTakVuT6bu2/ww7X7D/8IQyGC10FsAmEfWVDSrqz3Tpvs0clPdswBHDxbMz/4PK5DqaARyY/PVzrM1nJ9B/OuLl4Se/of7URlLx0HiU2szm0AGSz6HCrs+SY/oPN7QLySjL7gyt7VXgh3ManCfAr+8xtgQ4Iu52pnch1M+wjnaeI8JN5sMwkE6EyPuAe8SrwqAKMadYZWEksYDGL+hTDvrAO+02FUoSRezD6IxI+dm0F9Sz/PP/ow== X-YMail-OSG: VnZGmY8VM1lOB33.j_2FCJjgCrXd7tTHTgJzu5KkxYlUz6tgNYOoAdCDK.HIT.s rDffchgEXdzYiLcU1rbb9pNQYGU1Ft_aY15ylAE_m6.z.gi8ZTLfPU8xOr2CurbAZ8xYVS7sV9UR uCeeXdlHhxefULylG0vmG_Lvjhzj5P.gj8z9USIcfrhhnaz.VBJmVZlO4iymonP0ypNN5xAvZSB2 cIfxMFM3qbTN9g8UU7zcOhwbTy1zWxHQksEZlIdiV_ro6b7b6L4jECXNlyb0NlExhinDgKHTy54q bMJqwPSfx7ren7xacrkNkzIsKVj1BMNYAVYAVPZuBO0bA2sanWSmBQ4NOEUlmn05HSrEESryKqOp hjt9NFufcRVdCflrbVsscki8_Wf_DLSt6aORlBU_ei9EzuL18FMTIsVht8FWRjM.gjMHnMIul9zB zEX871Jujz_tGZ.Ix3vsuK8bJq6mHvX1COalRAltykJkJBUqOouu.1gH0CSv9vnVnEX1V4MLUs5l kYU1.t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EFKQTSQ75VFZs5XCbkmL8EonBJ0H8WV4By_Zg8DFiRS X6Zo4cDrzjiu6zXfn9dBITUVs6LON4d5UtxM3_2dEWX0d1XF_03pK3Zt5loScQVViSSOcvyGMVgg v1xjUJvsv5ex2vlTgGs6yFlbs55yWejNdMb1Fqm10H24b1Vr_3Lcry5ISD_1mYQd37w7Xr5jM3M8 LvuZFBc1mhgTsJZquEb.I0J_v11fDSVJAQNXbVl.NT3.RzyOb._76FFcFGKgKVYeMYGnEv.lNs88 _CG2elNWkunSy0JthB.Bgdjg5DyVGh7wBSEnl2r7.xwApnjgzrZRgc9NgaD1U3iEgtNAiMJd5Isw uDf_X78ogLIMVSTXYEs7TUIr.nlo1vQYDNoZHDQyoAqUT6u4lc7csi9SJuuSkqDLKmxWDHPUM370 iDuLIrkxXq_GpqSslaLL1g_P6ipg2Eb4LTjQH12jnXZP0oPZQ.XU1WpKLlZtDMHYQ3pVtRdugPbQ JDHwgoRd7VOTp.75WrtCtKt5I7goXzbAqO.mcJSxWba34R_kx6y124ZKSe7CcyvCC4xo4HqqgoOr PlUIQ.zcMp5ak9G8KOM0esJr7qCLtHF9BQx_Z3ErTZNGaoBT615CC8AubcmTuEQ4BglvrTWGwzpp 8iBlJlybAAqXgIen6u8fDNOvyTKAeb6AuHU92JX7PUYi6mdfZ8yMoxe_1SABxGeu3_os0QutotkI RHfoD2VbgfMLgcR5ZPXqbG4uMK6YumAj_1.1pEEX9p7WJx63EdTIIg7f_Ix9wasWlsfnTLmzfO7r Ylk3_hg-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.sg3.yahoo.com with HTTP; Thu, 7 Oct 2021 08:14:19 +0000 Date: Thu, 7 Oct 2021 08:14:16 +0000 (UTC) From: Sanjeev Adwal To: Tom Lane , Thomas Munro Cc: Pg Docs Message-ID: <687695613.174336.1633594456217@mail.yahoo.com> In-Reply-To: References: <163342695612.12514.13980479819790496744@wrigleys.postgresql.org> <4070814.1633445322@sss.pgh.pa.us> Subject: Re: Correction to documentation at https://www.postgresql.org/docs/12/kernel-resources.html MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_174335_2132493736.1633594456215" X-Mailer: WebService/1.1.19116 YMailNorrin Content-Length: 4311 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_174335_2132493736.1633594456215 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks Thomas. Looks like I misread that. On Wednesday, 6 October, 2021, 04:56:42 am IST, Thomas Munro wrote: =20 =20 On Wed, Oct 6, 2021 at 3:48 AM Tom Lane wrote: > PG Doc comments form writes: > > On https://www.postgresql.org/docs/12/kernel-resources.html, the comman= d to > > calculate memory allocated to postgres is not correct. Following is the > > command as shown in 18.4.5. Linux Huge Pages. > > pmap 4170 | awk '/rw-s/ && /zero/ {print $2}', this command does not re= turn > > any results with correct pid. Probably /zero/ needs to be updated with > > /anon_hugepage/ > > The example seems to work as-given for me (testing on a RHEL8 system). > It's of course not guaranteed to work on every flavor of Linux. I think the pattern as given will show you the size if you are not already using huge pages.=C2=A0 For example, this line matches on my system when I have /proc/sys/vm/nr_hugepages =3D=3D 0: 00007f2932eb6000 145360K rw-s- zero (deleted) If you are already using huge pages, it doesn't match anything, because the relevant line looks like: 00007f6814e00000 145408K rw-s- anon_hugepage (deleted) =20 ------=_Part_174335_2132493736.1633594456215 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Thomas. Looks like I = misread that.

=20
=20
On Wednesday, 6 October, 2021, 04:56:42 am IST, Thomas = Munro <thomas.munro@gmail.com> wrote:


On Wed, Oct 6, 2021 at 3:48 AM Tom La= ne <tgl@sss.pgh.pa.us> wrote:

> PG Doc comments form <<= a shape=3D"rect" ymailto=3D"mailto:noreply@postgresql.org" href=3D"mailto:n= oreply@postgresql.org">noreply@postgresql.org> writes:
> > On https://www.postgresql.org/d= ocs/12/kernel-resources.html, the command to
> >= ; calculate memory allocated to postgres is not correct. Following is the> > command as shown in 18.4.5. Linux Huge Pages.> > pmap 4170 | awk '/rw-s/ && /zero/ {print = $2}', this command does not return
> > any results = with correct pid. Probably /zero/ needs to be updated with
> > /anon_hugepage/
>
> T= he example seems to work as-given for me (testing on a RHEL8 system).
> It's of course not guaranteed to work on every flavor of = Linux.


I think the pattern as gi= ven will show you the size if you are not
already using h= uge pages.  For example, this line matches on my system
when I have /proc/sys/vm/nr_hugepages =3D=3D 0:

00007f2932eb6000 145360K rw-s- zero (deleted)

If you are already using huge pages, it doesn't match= anything,
because the relevant line looks like:

00007f6814e00000 145408K rw-s- anon_hugepage (= deleted)

<= /div>
------=_Part_174335_2132493736.1633594456215--