Thread: RAM usage of PostgreSql

RAM usage of PostgreSql

From
Prasad
Date:
Hi,

I have installed PostgreSQL 9.4 (open source) version on my CentOS Linux Red Hat 7 production server and kept default parameters which are in postgresql.conf file.So my basic question is, once I start using postgres how much RAM the postgres processes  consumes (postgres related processes only). 

There are lot of allocations in postgresql.conf file, for example shared_buffers, work_mem...etc.

As per my knowledge, all postgres processes should not consume the RAM more than the value assigned in shared_buffers.Please clarify and let me know if I misunderstand the concept..

--
Thanks,
Venkata Prasad


Re: RAM usage of PostgreSql

From
Laurenz Albe
Date:
Prasad wrote:
> I have installed PostgreSQL 9.4 (open source) version on my CentOS
> Linux Red Hat 7 production server and kept default parameters which
> are in postgresql.conf file.So my basic question is, once I start
> using postgres how much RAM the postgres processes  consumes
> (postgres related processes only). 
> 
> There are lot of allocations in postgresql.conf file, for example
> shared_buffers, work_mem...etc.
> 
> As per my knowledge, all postgres processes should not consume the
> RAM more than the value assigned in shared_buffers.Please clarify
> and let me know if I misunderstand the concept..

shared_buffers only determines the shared memory cache, each database
process still needs private memory.

As a rule of thumb, start with shared_buffers set to 1/4 of your
available RAM, but no more than 8GB.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




Re: RAM usage of PostgreSql

From
Laurenz Albe
Date:
Prasad wrote:
> I have installed PostgreSQL 9.4 (open source) version on my CentOS
> Linux Red Hat 7 production server and kept default parameters which
> are in postgresql.conf file.So my basic question is, once I start
> using postgres how much RAM the postgres processes  consumes
> (postgres related processes only). 
> 
> There are lot of allocations in postgresql.conf file, for example
> shared_buffers, work_mem...etc.
> 
> As per my knowledge, all postgres processes should not consume the
> RAM more than the value assigned in shared_buffers.Please clarify
> and let me know if I misunderstand the concept..

shared_buffers only determines the shared memory cache, each database
process still needs private memory.

As a rule of thumb, start with shared_buffers set to 1/4 of your
available RAM, but no more than 8GB.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




Re: RAM usage of PostgreSql

From
Keith
Date:


On Thu, Apr 4, 2019 at 10:48 AM Prasad <prasadnine@gmail.com> wrote:
Hi,

I have installed PostgreSQL 9.4 (open source) version on my CentOS Linux Red Hat 7 production server and kept default parameters which are in postgresql.conf file.So my basic question is, once I start using postgres how much RAM the postgres processes  consumes (postgres related processes only). 

There are lot of allocations in postgresql.conf file, for example shared_buffers, work_mem...etc.

As per my knowledge, all postgres processes should not consume the RAM more than the value assigned in shared_buffers.Please clarify and let me know if I misunderstand the concept..

--
Thanks,
Venkata Prasad



shared_buffers is just the shared memory segment. work_mem & maintenance_work mem are used in addition to shared_buffers and there can be multiples of those values in use at the same time. The PostgreSQL wiki has some good guidance on what the different memory settings mean and how to tune them



Re: RAM usage of PostgreSql

From
Keith
Date:


On Thu, Apr 4, 2019 at 10:48 AM Prasad <prasadnine@gmail.com> wrote:
Hi,

I have installed PostgreSQL 9.4 (open source) version on my CentOS Linux Red Hat 7 production server and kept default parameters which are in postgresql.conf file.So my basic question is, once I start using postgres how much RAM the postgres processes  consumes (postgres related processes only). 

There are lot of allocations in postgresql.conf file, for example shared_buffers, work_mem...etc.

As per my knowledge, all postgres processes should not consume the RAM more than the value assigned in shared_buffers.Please clarify and let me know if I misunderstand the concept..

--
Thanks,
Venkata Prasad



shared_buffers is just the shared memory segment. work_mem & maintenance_work mem are used in addition to shared_buffers and there can be multiples of those values in use at the same time. The PostgreSQL wiki has some good guidance on what the different memory settings mean and how to tune them