pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: philip johnson <philip.johnson@atempo.com>
To: pgsql-performance@postgresql.org
Subject: Re: how to configure my new server
Date: Thu, 6 Feb 2003 09:04:11 -0800
Message-ID: <200302060904.11652.josh@agliodbs.com> (raw)
In-Reply-To: <NDBBJLHHAKJFNNCGFBHLIEKPEKAA.philip.johnson@atempo.com>
References: <NDBBJLHHAKJFNNCGFBHLIEKPEKAA.philip.johnson@atempo.com>

Phillip,

First, a disclaimer:  my advice is without warranty whatsoever.  You want a 
warranty, you gotta pay me.

> I've a new configuration for our web server
>
> Processor	Processeur Intel Xeon 2.0 Ghz / 512 Ko de cache L2
> Memoiry	1 Go DDR SDRAM
> Disk1	18Go Ultra 3 (Ultra 160) SCSI 15 Ktpm
> Disk2	18Go Hot Plug Ultra 3 (Ultra 160) SCSI 15 Ktpm
> Disk3	18Go Hot Plug Ultra 3 (Ultra 160) SCSI 15 Ktpm
> Disk4	18Go Hot Plug Ultra 3 (Ultra 160) SCSI 15 Ktpm
> Disk5	36Go Hot Plug Ultra 3 (Ultra 160) SCSI 15 Ktpm

No RAID, though?

Think carefully about which disks you put things on.   Ideally, the OS, the 
web files, the database files, the database log, and the swap partition will 
all be on seperate disks.   With a large database you may even think about 
shifting individual tables or indexes to seperate disks.

> linux values:
> kernel.shmmni = 4096
> kernel.shmall = 32000000
> kernel.shmmax = 256000000

These are probably too high, but I'm ready to speak authoritatively on that.

> postgresql values:
> shared_buffers
> max_fsm_relations
> max_fsm_pages
> wal_buffers
> wal_files
> sort_mem
> vacuum_mem

Please visit the archives for this list.   Setting those values is a topic of 
discussion for 50% of the threads, and there is yet no firm agreement on good 
vs. bad values.

Also, you need to ask youself more questions before you start setting values:

1. How many queries does my database handle per second or minute?
2. How big/complex are those queries?
3. What is the ratio of database read activity vs. database writing activity?
4. What large tables in my database get queried simultaneously/together?
5. Are my database writes bundled into transactions, or seperate?
etc.

Simply knowing the size of the database files isn't enough.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



view thread (27+ messages)  latest in thread

Message-ID: <200302060904.11652.josh@agliodbs.com>
Permalink:  ../200302060904.11652.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200302060904.11652.josh@agliodbs.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: josh@agliodbs.com, philip.johnson@atempo.com
  Subject: Re: how to configure my new server
  In-Reply-To: <200302060904.11652.josh@agliodbs.com>
  References: <NDBBJLHHAKJFNNCGFBHLIEKPEKAA.philip.johnson@atempo.com> <200302060904.11652.josh@agliodbs.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