Re: performance problem

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Rick Gigger <rick(at)alpinenetworking(dot)com>
Cc: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: performance problem
Date: 2003-11-19 02:30:56
Message-ID: 20031119023055.GA22116@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Tue, Nov 18, 2003 at 04:54:59PM -0700, Rick Gigger wrote:
> > That's VERY high. When postgresql has to manage a lot of buffers it
> > actually is slower than letting the kernel in Linux or BSD do it for you.
>
> Even if you've got the memory to spare? Does postgres actually slow down
> just because it's slower to manager a lot of them just or because you're
> taking the memory away from the kernel so the kernel has to swap more?

It's a combination. Any buffer that's stored in the postgresql cache is also
in the kernel cache so that's just slightly inefficient. The kernel pool
manager tends to be more optimised for handling large numbers of buffers.
Because it's the kernel is can tailor for hardware quirks like high memory
and bounce buffers and such. And when you're not using your shared memory
it's wasted but the kernel can reallocate any memory it likes for any
purpose.

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message CLIFFORD ILKAY 2003-11-19 03:42:32 Why am I getting a "cursor already in use" error?
Previous Message Doug McNaught 2003-11-19 02:25:55 Re: performance problem

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Robert Norris 2003-11-19 02:31:54 Re: Detaching from controlling terminal
Previous Message Doug McNaught 2003-11-19 02:25:55 Re: performance problem