Received: from maia.hub.org (maia-1.hub.org [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1B7D463313F for ; Mon, 10 May 2010 09:33:47 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 66794-05 for ; Mon, 10 May 2010 12:33:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.sdb.it (mail.sdb.it [212.141.11.2]) by mail.postgresql.org (Postfix) with ESMTP id 06916632766 for ; Mon, 10 May 2010 09:33:38 -0300 (ADT) Received: by mail.sdb.it (Postfix, from userid 500) id 6C2E08146; Mon, 10 May 2010 14:33:35 +0200 (CEST) Received: from geronimo.sdb.it (geronimo.sdb.it [10.101.1.20]) by mail.sdb.it (Postfix) with ESMTP id 6716B8114; Mon, 10 May 2010 14:33:35 +0200 (CEST) Received: from mailtech.sdb.it (sdbit-srv01.sdb.it [10.118.122.250]) by geronimo.sdb.it (Postfix) with ESMTP id D258A3808A9; Mon, 10 May 2010 14:33:25 +0200 (CEST) Received: from [10.118.101.88] (silviob.sdb.it [10.118.101.88]) by mailtech.sdb.it (Postfix) with ESMTP id 4D49A58ABA; Mon, 10 May 2010 14:33:35 +0200 (CEST) Message-ID: <4BE7FD1F.1050903@tech.sdb.it> Date: Mon, 10 May 2010 14:33:35 +0200 From: Silvio Brandani User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Giles Lean Cc: pgsql-admin@postgresql.org Subject: Re: postgres invoked oom-killer References: <4BE4232B.3060401@tech.sdb.it> <4BE42E82.3070801@commandprompt.com> <4BE434EE.2050208@tech.sdb.it> <4BE43676.6060109@tech.sdb.it> <20100508030541.43086.qmail@sapphire.netherstone.net> In-Reply-To: <20100508030541.43086.qmail@sapphire.netherstone.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Private-Material: Please read notice X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-10 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/112 X-Sequence-Number: 34585 Giles Lean ha scritto: > Silvio Brandani wrote: > > >> yes the server is dedicated to PostgreSQL. >> >> Could be a bug of PostgreSQL the fact that the system went Out of >> Memory?? Wath can be the cause of it? >> >> Regards, >> Silvio >> > > The out of memory killer is a totally bogus misfeature of > Linux. At least these days they let you turn it off, and > everyone should turn it off _and_ should bug their OS vendor > to request that they ship their distribution with memory > overcommit and the out of memory killer disabled. > > The "out of memory" killer only exists because Linux by > default will allow more memory to be allocated than exists in > the system. This is called "memory overcommit" and is kown in > operating system circles (outside of Linux) to be a bad thing. > > The rationale for memory overcommit being a bad thing is that > if your OS doesn't allow allocation of more memory than there > is in the system, then applications are forced to deal with > memory requests that fail, instead of seeing those requests > "succeed" and being killed some random time later. > > Allowing more memory to be "allocated" than exists in the > machine is only useful in two circumstances that I know of, > and neither apply to a dedicated PostgreSQL system, running > Linux or not: > > 1. When badly written applications allocate far more memory > than they use. PostgreSQL isn't like that. > > The technically correct solution is to fix the > applications; allowing memory overcommit is a dangerous > workaround that _will_ cause problems. > > 2. When very large processes need to fork (e.g. a scientific > numerical analysis program using most of physical memory) > might want to fork to send an email notification or > something similar). > > The technically correct solution is to use vfork(). > > I won't make myself popular with the Linux zealots, but memory > overcommit should just be removed from Linux. It does way more > harm than good on any operating system I've ever seen it used > on, and the problems it has caused just on Linux are legion. > > The only OS that had _any_ excuse for memory overcommit I've > seen was one that lacked a vfork() system call; they added > that call and the justification for memory overcommit went > away. > > Regards, > > Giles > > Thanks a lot, I' m going to disable the memory killer, moreover I have run the Operative System watcher scripts to monitor the undergoing activity in case it happens again. Best Regards, Silvio Brandani -- Silvio Brandani Infrastructure Administrator SDB Information Technology Phone: +39.055.3811222 Fax: +39.055.5201119 --- Utilizziamo i dati personali che la riguardano esclusivamente per nostre finalitą amministrative e contabili, anche quando li comunichiamo a terzi. Informazioni dettagliate, anche in ordine al Suo diritto di accesso e agli altri Suoi diritti, sono riportate alla pagina http://www.savinodelbene.com/news/privacy.html Se avete ricevuto questo messaggio per errore Vi preghiamo di ritornarlo al mittente eliminandolo assieme agli eventuali allegati, ai sensi art. 616 codice penale http://www.savinodelbene.com/codice_penale_616.html L'Azienda non si assume alcuna responsabilitą giuridica qualora pervengano da questo indirizzo messaggi estranei all'attivitą lavorativa o contrari a norme. --