pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: William Yu <wyu@talisys.com>
To: pgsql-performance@postgresql.org
Subject: Re: Tuning for mid-size server
Date: Tue, 21 Oct 2003 09:25:56 -0700
Message-ID: <bn3mmj$12cd$1@news.hub.org> (raw)
In-Reply-To: <2F2E24372F10744588A27DEECC85FE04B6769C@vt-pe2550-001.vantage.vantage.com>
References: <2F2E24372F10744588A27DEECC85FE04B6769C@vt-pe2550-001.vantage.vantage.com>

Anjan Dave wrote:

> Shared_buffers (25% of RAM / 8KB)) = 8589934592 * .25 / 8192 = 262144

250,000 is probably the max you can use due to the 2GB process limit 
unless you recompile the Linux Kernel to use 3GB process/1GB kernel. 
Yes, I've got 8GB also and I started at 262144 and kept working my way 
down until Linux would allocate the memory.

> 
> Sort_mem (4% of RAM / 1KB) = 335544. We'll take about half of that - 167772
> 
> Effective_cache_size = 262144 (same as shared_buffers - 25%)

This should reflect the amount of memory available for caching. And 
unless you plan on running a ton of memory hogging software on the same 
machine, you probably will have 6GB available as cache. Top on my system 
confirms the 6GB number so I've got my setting at 750,000. (Left a 
little space for OS/programs/etc.)

> In the /etc/sysctl file:
> =================
> kernel.shmall = 536870912 (512MB) SHMALL Total amount of shared memory 
> available (bytes or pages)
> kernel.shmmax = 536870912 (512MB) SHMMAX Maximum size of shared memory 
> segment (bytes)

Ain't gonna happen unless you recompile the linux kernel to do 3/1. 
Through trial-and-error, I've found the largest number is:

2,147,483,648

> Are the above settings ok to begin with? Are there any other parameters 
> that I should configure now, or monitor lateron?

Above is pretty good. I'd also bump up the free space map settings and 
maybe try to symlink the pg_xlog directory (log files) to a seperate drive.




view thread (29+ messages)  latest in thread

Message-ID: <bn3mmj$12cd$1@news.hub.org>
Permalink:  ../bn3mmj$12cd$1@news.hub.org/
Also on:    postgresql.org/message-id/bn3mmj$12cd$1@news.hub.org

 · 

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: wyu@talisys.com
  Subject: Re: Tuning for mid-size server
  In-Reply-To: <bn3mmj$12cd$1@news.hub.org>

* 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