Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 04B8E650258 for ; Wed, 27 Aug 2008 19:14:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 81731-01 for ; Wed, 27 Aug 2008 19:13:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 6443B6501E6 for ; Wed, 27 Aug 2008 19:13:43 -0300 (ADT) Received: from commandprompt.com (CPE001b63afe888-CM001adea9c5a6.cpe.net.cable.rogers.com [99.236.211.160]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m7RMGjil005621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 27 Aug 2008 15:16:48 -0700 Date: Wed, 27 Aug 2008 18:13:38 -0400 From: Andrew Sullivan To: pgsql-performance@postgresql.org Subject: Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception Message-ID: <20080827221338.GP18946@commandprompt.com> Mail-Followup-To: Andrew Sullivan , pgsql-performance@postgresql.org References: <82bpze3ou8.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Wed, 27 Aug 2008 15:16:48 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/357 X-Sequence-Number: 31238 On Wed, Aug 27, 2008 at 02:45:47PM -0700, david@lang.hm wrote: > with memory overcommit enabled (the default), the kernel recognises that > most programs that fork don't write to all the memory they have > allocated, It doesn't "recognise" it; it "hopes" it. It happens to hope correctly in many cases, because you're quite right that many programs don't actually need all the memory they allocate. But there's nothing about the allocation that hints, "By the way, I'm not really planning to use this." Also. . . > seperate copies for the seperate processes (and if at this time it runs of > of memory it invokes the OOM killer to free some space), . . .it kills processes that are using a lot of memory. Those are not necessarily the processes that are allocating memory they don't need. The upshot of this is that postgres tends to be a big target for the OOM killer, with seriously bad effects to your database. So for good Postgres operation, you want to run on a machine with the OOM killer disabled. A -- Andrew Sullivan ajs@commandprompt.com +1 503 667 4564 x104 http://www.commandprompt.com/