pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jian xu <jamesxu@outlook.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: MichaelDBA <MichaelDBA@sqlexec.com>
Cc: Scott Ribe <scott_ribe@elevated-dev.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: checkpoint process use too much memory
Date: Tue, 21 Jul 2020 23:48:14 +0000
Message-ID: <MN2PR05MB683257DAD723CF8BDBB4149DA1780@MN2PR05MB6832.namprd05.prod.outlook.com> (raw)
In-Reply-To: <MN2PR05MB683244F6E40897EF187E53F2A1780@MN2PR05MB6832.namprd05.prod.outlook.com>
References: <MN2PR05MB68322593E34D4BF78AD45137A1D70@MN2PR05MB6832.namprd05.prod.outlook.com>
	<5193b00d175f2e06a171ba375f1ef723e1700de4.camel@cybertec.at>
	<MN2PR05MB6832AA29B8D72FCA59D29E19A1D40@MN2PR05MB6832.namprd05.prod.outlook.com>
	<C7D8AF88-5A80-4F1E-B3AF-7BB01369FD87@elevated-dev.com>
	<MN2PR05MB6832881823D2B12D767C8C67A1D40@MN2PR05MB6832.namprd05.prod.outlook.com>
	<B2103F5D-29DD-465C-A43B-9973EC313799@elevated-dev.com>
	<fcb5bde4-437d-913e-cb1f-3fdb866a805a@sqlexec.com>
	<MN2PR05MB68327F7153695ED742BF1B19A1D50@MN2PR05MB6832.namprd05.prod.outlook.com>
	<DM6PR05MB68270B6144BDF688D3849436A17B0@DM6PR05MB6827.namprd05.prod.outlook.com>
	<736811.1595284465@sss.pgh.pa.us>
	<MN2PR05MB683244F6E40897EF187E53F2A1780@MN2PR05MB6832.namprd05.prod.outlook.com>

btw, I checked /proc/<PID>/smaps. it looks like postgres process took most of the memory, the output is like:
===============================================================================
564415881000-56441588f000 rw-p 00857000 08:04 17682620                  postgresql/10/3/dist/bin/postgres
Size:                 56 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Rss:                  56 kB
Pss:                  56 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:        56 kB
Referenced:           56 kB
Anonymous:            56 kB
LazyFree:              0 kB
AnonHugePages:         0 kB
ShmemPmdMapped:        0 kB
Shared_Hugetlb:        0 kB
Private_Hugetlb:       0 kB
Swap:                  0 kB
SwapPss:               0 kB
Locked:                0 kB
VmFlags: rd wr mr mw me dw ac sd
5644162cf000-565d4c645000 rw-p 00000000 00:00 0                          [heap]
Size:           105745880 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Rss:            105745692 kB
Pss:            105745692 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:  105745692 kB
Referenced:     104768404 kB
Anonymous:      105745692 kB
LazyFree:              0 kB
AnonHugePages:         0 kB
ShmemPmdMapped:        0 kB
Shared_Hugetlb:        0 kB
Private_Hugetlb:       0 kB
Swap:                  0 kB
SwapPss:               0 kB
Locked:                0 kB
VmFlags: rd wr mr mw me ac sd
===============================================================================
however, the shared_buffers size is only 4GB..
postgres=# show shared_buffers ;
 shared_buffers
----------------
 4GB

thanks,

James
________________________________
From: jian xu <jamesxu@outlook.com>
Sent: Tuesday, July 21, 2020 9:20
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: MichaelDBA <MichaelDBA@sqlexec.com>; Scott Ribe <scott_ribe@elevated-dev.com>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: checkpoint process use too much memory

Thanks Tom and Alvaro. I will upgrade it to 10.13 first.
James

________________________________
From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Monday, July 20, 2020 18:34
To: jian xu <jamesxu@outlook.com>
Cc: MichaelDBA <MichaelDBA@sqlexec.com>; Scott Ribe <scott_ribe@elevated-dev.com>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: checkpoint process use too much memory

jian xu <jamesxu@outlook.com> writes:
>       we are seeing this issue again, the checkpoint process is eating up all the memory,
> based on the htop, the checkpointer process has
> VIRT: 103G
> RES: 103G
> SHR: 4099M

hmmm ...

> my pg version is 10.3 ,

Really the *first* thing you ought to do is update to current (10.13)
and see if the problem is still there.  But if it is, maybe collecting
a memory context map in that process would be informative:

https://wiki.postgresql.org/wiki/Developer_FAQ#Examining_backend_memory_use

Note you may need a debug build for that recipe to work.

                        regards, tom lane

view thread (5+ messages)

Message-ID: <MN2PR05MB683257DAD723CF8BDBB4149DA1780@MN2PR05MB6832.namprd05.prod.outlook.com>
Permalink:  ../MN2PR05MB683257DAD723CF8BDBB4149DA1780@MN2PR05MB6832.namprd05.prod.outlook.com/
Also on:    postgresql.org/message-id/MN2PR05MB683257DAD723CF8BDBB4149DA1780@MN2PR05MB6832.namprd05.prod.outlook.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jamesxu@outlook.com, tgl@sss.pgh.pa.us, MichaelDBA@sqlexec.com, scott_ribe@elevated-dev.com, laurenz.albe@cybertec.at
  Subject: Re: checkpoint process use too much memory
  In-Reply-To: <MN2PR05MB683257DAD723CF8BDBB4149DA1780@MN2PR05MB6832.namprd05.prod.outlook.com>
  References: <MN2PR05MB68322593E34D4BF78AD45137A1D70@MN2PR05MB6832.namprd05.prod.outlook.com> <5193b00d175f2e06a171ba375f1ef723e1700de4.camel@cybertec.at> <MN2PR05MB6832AA29B8D72FCA59D29E19A1D40@MN2PR05MB6832.namprd05.prod.outlook.com> <C7D8AF88-5A80-4F1E-B3AF-7BB01369FD87@elevated-dev.com> <MN2PR05MB6832881823D2B12D767C8C67A1D40@MN2PR05MB6832.namprd05.prod.outlook.com> <B2103F5D-29DD-465C-A43B-9973EC313799@elevated-dev.com> <fcb5bde4-437d-913e-cb1f-3fdb866a805a@sqlexec.com> <MN2PR05MB68327F7153695ED742BF1B19A1D50@MN2PR05MB6832.namprd05.prod.outlook.com> <DM6PR05MB68270B6144BDF688D3849436A17B0@DM6PR05MB6827.namprd05.prod.outlook.com> <736811.1595284465@sss.pgh.pa.us> <MN2PR05MB683244F6E40897EF187E53F2A1780@MN2PR05MB6832.namprd05.prod.outlook.com> <MN2PR05MB683257DAD723CF8BDBB4149DA1780@MN2PR05MB6832.namprd05.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox