Re: postgres invoked oom-killer

From: Silvio Brandani <silvio(dot)brandani(at)tech(dot)sdb(dot)it>
To: Giles Lean <giles(dot)lean(at)pobox(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: postgres invoked oom-killer
Date: 2010-05-10 12:33:35
Message-ID: 4BE7FD1F.1050903@tech.sdb.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Giles Lean ha scritto:
> Silvio Brandani <silvio(dot)brandani(at)tech(dot)sdb(dot)it> 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.
--

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Greg Spiegelberg 2010-05-10 13:52:20 Re: postgres invoked oom-killer
Previous Message Simon Riggs 2010-05-09 20:42:47 List traffic