Skip site navigation (1) Skip section navigation (2)

Re: select on 22 GB table causes "An I/O error occuredwhile sending to the backend." exception

From: Andrew Sullivan <ajs(at)commandprompt(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: select on 22 GB table causes "An I/O error occuredwhile sending to the backend." exception
Date: 2008-08-27 22:13:38
Message-ID: 20080827221338.GP18946@commandprompt.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Wed, Aug 27, 2008 at 02:45:47PM -0700, david(at)lang(dot)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(at)commandprompt(dot)com
+1 503 667 4564 x104
http://www.commandprompt.com/

In response to

Responses

pgsql-performance by date

Next:From: davidDate: 2008-08-27 22:22:09
Subject: Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception
Previous:From: davidDate: 2008-08-27 21:45:47
Subject: Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group