Re: Docs about buffers and sortmem setting

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Docs about buffers and sortmem setting
Date: 2002-11-14 13:35:14
Message-ID: 20021114083514.A9625@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Nov 14, 2002 at 01:19:57PM +0100, Bjoern Metzdorf wrote:

> How about 32-bit Linux machines with more than 1 GB RAM? We have a 2 GB RAM
> machine running, and I gave 800 MB to postgres shared buffers. AFAIK Linux
> user space can handle only 1 GB and the rest is for kernel buffer and
> cache..

How big is your data set? If it's smaller than 800 MB, you're
wasting the buffers anyway.

The thing is that the OS will buffer what you read anyway, so
depending on how large your buffers are and how much memory your
filesystem is able to use for its buffersm, you may actually be storing
twice in memory everything in the shared memory: once in the shared
area, and another time in the filesystem buffer.

On our 16 G Solaris (Ultra SPARC) boxes, we found that using a gig
for shared buffers was actually worse than a slightly lower amount,
under Sol 7. The filesystem buffering is too good, so even though
the system call to the "filesystem" (which turns out to be just to
memory, because of the buffer) has a measurable cost, the
implementation of the shared-buffer handling is bad enough that it
costs _more_ to manage large buffers. Smaller buffers seem not to
face the difficulty. I haven't a clue why.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Shridhar Daithankar 2002-11-14 14:37:24 Re: swapping?
Previous Message Bjoern Metzdorf 2002-11-14 12:19:57 Re: Docs about buffers and sortmem setting