Re: Tuning for mid-size server

From: William Yu <wyu(at)talisys(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Tuning for mid-size server
Date: 2003-10-21 16:25:56
Message-ID: bn3mmj$12cd$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Anjan Dave 2003-10-21 16:26:09 Re: Tuning for mid-size server
Previous Message Seum-Lim Gan 2003-10-21 16:25:33 Re: index file bloating still in 7.4 ?