Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 961B59F9DA4 for ; Fri, 7 Sep 2007 06:31:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 61175-04 for ; Fri, 7 Sep 2007 06:31:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from oxford.xeocode.com (unknown [87.127.95.196]) by postgresql.org (Postfix) with ESMTP id 4D8BE9F9D8F for ; Fri, 7 Sep 2007 06:31:40 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1ITaBd-0001SR-O2; Fri, 07 Sep 2007 10:31:37 +0100 To: "Richard Yen" Cc: Subject: Re: postgres memory management issues? In-Reply-To: (Richard Yen's message of "Thu\, 6 Sep 2007 09\:06\:53 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.performance" 2336) References: From: Gregory Stark Organization: EnterpriseDB Date: Fri, 07 Sep 2007 10:31:34 +0100 Message-ID: <874pi6zurt.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/117 X-Sequence-Number: 26662 "Richard Yen" writes: > My understanding is that if any one postgres process's memory usage, plus the > shared memory, exceeds the kernel limit of 4GB, then the kernel will kill the > process off. Is this true? If so, would postgres have some prevention > mechanism that would keep a particular process from getting too big? (Maybe > I'm being too idealistic, or I just simply don't understand how postgres works > under the hood) I don't think you have an individual process going over 4G. I think what you have is 600 processes which in aggregate are using more memory than you have available. Do you really need 600 processes by the way? You could try lowering work_mem but actually your value seems fairly reasonable. Perhaps your kernel isn't actually able to use 16GB? What does cat /proc/meminfo say? What does it say when this is happening? You might also tweak /proc/sys/vm/overcommit_memory but I don't remember what the values are, you can search to find them. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com