Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2E139632220 for ; Wed, 4 Mar 2009 08:46:34 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 54703-07 for ; Wed, 4 Mar 2009 08:46:29 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mta.4linux.com.br (boca.4linux.com.br [200.212.122.137]) by mail.postgresql.org (Postfix) with ESMTP id 5A05B62DDA8 for ; Wed, 4 Mar 2009 08:46:27 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mta.4linux.com.br (Postfix) with ESMTP id 0D610CA5D for ; Wed, 4 Mar 2009 09:46:25 -0300 (BRT) X-Virus-Scanned: amavisd-new at mta.4linux.com.br Received: from mta.4linux.com.br ([127.0.0.1]) by localhost (mta.4linux.com.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vw6OtVdYNbU6 for ; Wed, 4 Mar 2009 09:46:23 -0300 (BRT) Received: from mail.4linux.com.br (unknown [192.168.0.11]) by mta.4linux.com.br (Postfix) with ESMTP id 3DE96CA5B for ; Wed, 4 Mar 2009 09:46:23 -0300 (BRT) Date: Wed, 4 Mar 2009 09:46:27 -0300 (BRT) From: Flavio Henrique Araque Gurgel To: pgsql-performance Message-ID: <13904207.99291236170787203.JavaMail.root@mail.4linux.com.br> In-Reply-To: <31859115.99181236170659339.JavaMail.root@mail.4linux.com.br> Subject: Re: work_mem in high transaction rate database MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3920_1913431.1236170787202" X-Originating-IP: [192.168.0.189] X-Mailer: Zimbra 5.0.13_GA_2791.UBUNTU6 (ZimbraWebClient - [unknown] (Linux)/5.0.13_GA_2791.UBUNTU6) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200903/42 X-Sequence-Number: 32964 ------=_Part_3920_1913431.1236170787202 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit ----- "Scott Marlowe" escreveu: > Oh my lord, that is a foot gun waiting to go off. Assuming 2k > connections, and somehow a fair number of them went active with big > sorts, you'd be able to exhaust all physical memory with about 8 to > 16 connections. Lower work_mem now. To something like 1 to 4 Meg. Do > not pass go. If some oddball query really needs a lot of work_mem, > and benchmarks show something larger work_mem helps, consider raising > the work_mem setting for that one query to something under 1G (way > under 1G) That makes it noticeably faster. Don't allocate more than a > test shows you helps. Thanks a lot Scott. That's what I thought in the beginning but was very doubtful since the documentation is a bit odd regarding this point and several bloggers talk about increasing this value up to 250MB. I really think that separating regular non pooled distributed applications and pooled application servers makes a lot of difference in this point. > Vacuum does not block transactions. unless you're dropping tables or something. I'll try to separate things and check if the DELETE queries have something related here. (...) > what you think they mean. Post the first 20 or so lines from top to > show us. Unfortunately I can't do it. The data there is very sensitive (it's a public company here in Brazil) and the server is operated only by selected personal. I just ask for information and give written recomendations. Anyway, I'm going to pay some more attention in this topic. This is a very interesting implementation of PostgreSQL (3 large databases, heavy load, things growing all the time) and I'll let you all know what happened when tuning it. I'll feedback you after lowering work_mem and changing related settings. Thanks Flavio ------=_Part_3920_1913431.1236170787202 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: Times New Roman; font-size: 12pt; color: #000000'= >----- "Scott Marlowe" <scott.marlowe@gmail.com> escreveu:
> Oh my lord, that is a foot gun waiting to go off.  Assuming 2= k
> connections, and somehow a fair number of them went active with b= ig
> sorts, you'd be able to exhaust all physical memory  with a= bout 8 to
> 16 connections.  Lower work_mem now. To something li= ke 1 to 4 Meg.  Do
> not pass go.  If some oddball query re= ally needs a lot of work_mem,
> and benchmarks show something larger = work_mem helps, consider raising
> the work_mem setting for that one = query to something under 1G (way
> under 1G) That makes it noticeably= faster.  Don't allocate more than a
> test shows you helps.
=
Thanks a lot Scott. That's what I thought in the beginning but was very= doubtful since the documentation is a bit odd regarding this point and sev= eral bloggers talk about increasing this value up to 250MB. I really think = that separating regular non pooled distributed applications and pooled appl= ication servers makes a lot of difference in this point.

> Vacuum= does not block transactions.  unless you're dropping tables or someth= ing.

I'll try to separate things and check if the DELETE queries hav= e something related here.

(...)
> what you think they mean. &n= bsp;Post the first 20 or so lines from top to
> show us.

Unfor= tunately I can't do it. The data there is very sensitive (it's a public com= pany here in Brazil) and the server is operated only by selected personal. = I just ask for information and give written recomendations. Anyway, I'm goi= ng to pay some more attention in this topic.

This is a very interest= ing implementation of PostgreSQL (3 large databases, heavy load, things gro= wing all the time) and I'll let you all know what happened when tuning it. = I'll feedback you after lowering work_mem and changing related settings.
Thanks
Flavio
------=_Part_3920_1913431.1236170787202--