Re: Pre-allocation of shared memory ...

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Pre-allocation of shared memory ...
Дата
Msg-id 874r2ulojx.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответ на Re: Pre-allocation of shared memory ...  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: Pre-allocation of shared memory ...  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:

> On Thu, Jun 12, 2003 at 09:18:33PM -0400, Tom Lane wrote:
> 
> > Given that swap space is cheap, and that killing random processes is
> > obviously bad, it's not apparent to me why people think this is not
> > a good approach --- at least for high-reliability servers.  And Linux
> > would definitely like to think of itself as a server-grade OS.

Consider the case of huge processes trying to fork/exec to run ls. It might
seem kind of strange to be getting "Out of memory" errors from your java or
database engine when there are hundreds of megs free on the machine...

I suspect this was less of an issue in the days before copy on write because
vfork was more widely used/implemented. I'm not sure linux even implements
vfork other than just as a wrapper around fork. Even BSD ditched it a while
back though I think I saw that NetBSD reimplemented it since then.

> But then there's the problem of people running database servers on
> misconfigured machines.  They should know better than not setting enough
> swap space, IMHO anyway.

Well, I've seen DBAs say "Since I don't want the database swapping anyways,
I'll make really sure it doesn't swap by just not giving it any swap space --
that's why we bought so much RAM in the first place". It's not obvious that
you need swap to back memory the machine doesn't even report as being in
use...

-- 
greg



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Sean Chittenden
Дата:
Сообщение: Re: CVS -Tip compile issue -- FreeBSD 4.8
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Pre-allocation of shared memory ...