pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Close <narshe@gmail.com>
To: POSTGRES-PERFORMANCE <pgsql-performance@postgresql.org>
Subject: how much mem to give postgres?
Date: Tue, 19 Oct 2004 17:31:59 -0500
Message-ID: <4a0cafe2041019153133f854e9@mail.gmail.com> (raw)

I'm trying to figure out what I need to do to get my postgres server
moving faster. It's just crawling right now. It's on a p4 HT with 2
gigs of mem.

I was thinking I need to increase the amount of shared buffers, but
I've been told "the sweet spot for shared_buffers is usually on the
order of 10000 buffers". I already have it set at 21,078. If you have,
say 100 gigs of ram, are you supposed to still only give postgres
10,000?

Also, do I need to up the shmmax at all? I've used the formula "250 kB
+ 8.2 kB * shared_buffers + 14.2 kB * max_connections up to infinity"
at http://www.postgresql.org/docs/7.4/interactive/kernel-resources.html#SYSVIPC
but it's never quite high enough, so I just make sure it's above the
amount that the postgres log says it needs.

What else can I do to speed this server up? I'm running vacuum analyze
on the heavily updated/inserted/deleted db's once an hour, and doing a
full vacuum once a night. Should I change the vacuum mem setting at
all?

Are there any other settings I should be concerned with? I've heard
about the effective_cache_size setting, but I haven't seen anything on
what the size should be.

Any help would be great. This server is very very slow at the moment.

Also, I'm using a 2.6.8.1 kernel with high mem enabled, so all the ram
is recognized.

Thanks.

-Josh



view thread (11+ messages)  latest in thread

Message-ID: <4a0cafe2041019153133f854e9@mail.gmail.com>
Permalink:  ../4a0cafe2041019153133f854e9@mail.gmail.com/
Also on:    postgresql.org/message-id/4a0cafe2041019153133f854e9@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: narshe@gmail.com
  Subject: Re: how much mem to give postgres?
  In-Reply-To: <4a0cafe2041019153133f854e9@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox