Re: Tuning for mid-size server - Mailing list pgsql-performance

From William Yu
Subject Re: Tuning for mid-size server
Date
Msg-id bn3mmj$12cd$1@news.hub.org
Whole thread Raw
In response to Tuning for mid-size server  ("Anjan Dave" <adave@vantage.com>)
List 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.


pgsql-performance by date:

Previous
From: Rob Messer
Date:
Subject: Use of multipart index with "IN"
Next
From: William Yu
Date:
Subject: Re: PostgreSQL data on a NAS device ?