Re: to many locks held

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Jeison Bedoya <jeisonb(at)audifarma(dot)com(dot)co>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: to many locks held
Date: 2013-08-02 21:03:28
Message-ID: 1375477408.36283.YahooMailNeo@web162901.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jeison Bedoya <jeisonb(at)audifarma(dot)com(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Sergey Burladyan 2013-08-02 21:17:13 Re: Looks like merge join planning time is too big, 55 seconds
Previous Message Tom Lane 2013-08-02 20:51:23 Re: subselect requires offset 0 for good performance.