Re: checkpoint process use too much memory

From: jian xu <jamesxu(at)outlook(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>, Scott Ribe <scott_ribe(at)elevated-dev(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: checkpoint process use too much memory
Date: 2020-07-21 23:48:14
Message-ID: MN2PR05MB683257DAD723CF8BDBB4149DA1780@MN2PR05MB6832.namprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)outlook(dot)com>
Sent: Tuesday, July 21, 2020 9:20
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>; Scott Ribe <scott_ribe(at)elevated-dev(dot)com>; Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>; pgsql-admin(at)postgresql(dot)org <pgsql-admin(at)postgresql(dot)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(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Monday, July 20, 2020 18:34
To: jian xu <jamesxu(at)outlook(dot)com>
Cc: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>; Scott Ribe <scott_ribe(at)elevated-dev(dot)com>; Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>; pgsql-admin(at)postgresql(dot)org <pgsql-admin(at)postgresql(dot)org>
Subject: Re: checkpoint process use too much memory

jian xu <jamesxu(at)outlook(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2020-07-22 16:48:49 Creating trigger with optional arg?
Previous Message jian xu 2020-07-21 13:20:23 Re: checkpoint process use too much memory