Re: to many locks held - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: to many locks held
Date
Msg-id 1375477408.36283.YahooMailNeo@web162901.mail.bf1.yahoo.com
Whole thread Raw
In response to to many locks held  (Jeison Bedoya <jeisonb@audifarma.com.co>)
List pgsql-performance
Jeison Bedoya <jeisonb@audifarma.com.co> wrote:

> memory ram: 128 GB
> cores: 32
>
> max_connections: 900

> temp_buffers =  512MB

In addition to the other comments, be aware that temp_buffers is
the limit of how much RAM *each connection* can acquire to avoid
writing temporary table data to disk.  Once allocated to a
connection, it will be reserved for that use on that connection
until the connection closes.  So temp_buffers could lock down 450
GB of RAM even while all connections are idle.  If the maximum
connections become active, and they average one work_mem allocation
apiece, that's an *additional* 900 GB of RAM which would be needed
to avoid problems.

Reducing connections through a pooler is strongly indicated, and
you may still need to reduce work_mem or temp_buffers.

http://wiki.postgresql.org/wiki/Number_Of_Database_Connections

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: subselect requires offset 0 for good performance.
Next
From: Sergey Burladyan
Date:
Subject: Re: Looks like merge join planning time is too big, 55 seconds