From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jon Lapham <lapham(at)extracta(dot)com(dot)br>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Pre-allocation of shared memory ... |
Date: | 2003-06-12 15:31:28 |
Message-ID: | 200306121531.h5CFVSU03219@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
OK, doc patch attached and applied. Improvements?
---------------------------------------------------------------------------
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > What really kills [:-)] me is that they allocate memory assuming I will
> > not be using it all, then terminate the executable in an unrecoverable
> > way when I go to use the memory.
>
> To be fair, I'm probably misstating things by referring to malloc().
> The big problem probably comes from fork() with copy-on-write --- the
> kernel has no good way to estimate how much of the shared address space
> will eventually become private modified copies, but it can be forgiven
> for wanting to make less than the worst-case assumption.
>
> Still, if you are wanting to run a reliable server, I think worst-case
> assumption is exactly what you want. Swap space is cheap, and there's
> no reason you shouldn't have enough swap to support the worst-case
> situation. If the swap area goes largely unused, that's fine.
>
> The policy they're calling "paranoid overcommit" (don't allocate more
> virtual memory than you have swap) is as far as I know the standard on
> all Unixen other than Linux; certainly it's the traditional behavior.
>
> regards, tom lane
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 1014 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-06-12 15:39:36 | Re: Pre-allocation of shared memory ... |
Previous Message | Tom Lane | 2003-06-12 15:19:51 | Re: Pre-allocation of shared memory ... |