Re: calculating shared data memory space

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: Jean-Michel Pouré <jm(at)poure(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: calculating shared data memory space
Date: 2008-01-07 20:00:59
Message-ID: dcc563d10801071200u43d1d2c2gfdb86e41ff0d6f74@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Jan 7, 2008 11:29 AM, Jean-Michel Pouré <jm(at)poure(dot)com> wrote:
> Dear Friends,
>
> I am running a phpBB forum with more than 400.000 messages.
> I would like to make sure that all indexes fit in shared memory.

You're kind of leaning towards tying to optimized things in postgresql
the way other dbs are optimized.

Not to say that increasing shared memory won't help, especially with
something like phpBB. It likely will.

A good setting for shared_buffers on a machine running 8.x and with a
fair bit of memory is usually somewhere in the 25% range. But that is
just a guideline. Set it to various higher and lower settings and
test to see which is best for you.

Note that the OS caches data as well, and does so quite efficiently.
The real advantage to larger shared_buffers is in the db being able to
fit what it's currently working on into its own memory in one big
chunkj.

> How can I calculate the needed space of all indexes?
> I remember this was part of VACUUM FULL ANALYSE or the like.

That's the Free Space Map I think you're talking about, and it doesn't
need to be a vacuum full analzye usually, just vacuum analyze.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-01-07 20:10:11 Re: Hash Indexes
Previous Message Tom Lane 2008-01-07 19:59:29 Re: WAL Sequence