BUG #16831: Idle postgres processes on Linux consumes huge amount of memory

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: yli(at)rsa(dot)com
Subject: BUG #16831: Idle postgres processes on Linux consumes huge amount of memory
Date: 2021-01-20 21:04:56
Message-ID: 16831-c341255cd0d97a74@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16831
Logged by: Yaqing Li
Email address: yli(at)rsa(dot)com
PostgreSQL version: Unsupported/Unknown
Operating system: Suse Linux
Description:

We are still using postgresql 9.4.1, however, it looks the same issue as in
9.5 as someone reported:
https://www.postgresql.org/account/reset/NzAyMjY-5ng-2bb43dc39c9c2c644a7a/

We have some client side read only user run report against the database
using ADODB. On a 16GB system, when the memory setting for database is as
following.
shared_buffers = 3840MB
effective_cache_size = 8GB
max_connections = 200
work_mem = 80MB
maintenance_work_mem = 960MB
The memory consumption for each postgres process is like this:
PID=11152 - Swap used: 3736 KB - (postgres)
PID=3380 - Swap used: 1580 KB - (postgres)
PID=11150 - Swap used: 1568 KB - (postgres)
PID=11147 - Swap used: 1352 KB - (postgres)
PID=3382 - Swap used: 660 KB - (postgres)

The system works fine with that,
But after we changed the system memory to 32GB, and adjusted the database
memory to the following:
shared_buffers = 7680MB
effective_cache_size = 16GB
max_connections = 200
work_mem = 160MB
maintenance_work_mem = 1920MB

The postgres process consume huge memory as following for the same database
size
PID=6840 - Swap used: 145860 KB - (postgres)

PID=6842 - Swap used: 142564 KB - (postgres)

PID=6841 - Swap used: 141620 KB - (postgres)

So it looks to me there is a bug in PostgresSql about the memory allocation,
is it fixed in any version?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2021-01-20 22:26:12 Re: Reproducible GIST index corruption under concurrent updates
Previous Message Tom Lane 2021-01-20 15:38:53 Re: Bug Report | Using ts_headline with the <-> operator