tune memory usage for master/slave nodes in cluster

From: stanimir petrov <cristal_reaver(at)abv(dot)bg>
To: pgsql-performance(at)postgresql(dot)org
Subject: tune memory usage for master/slave nodes in cluster
Date: 2010-07-21 12:42:04
Message-ID: 609756248.1423.1279716124148.JavaMail.apache@mail71.abv.bg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Hi
I need to configure for high performance and memory usage my postgres 8.4 clusters.

Description:
The database is partitioned in regions. Every region has master and slave db. The application write:read=1:50.
At the moment i had delpoyed the app on 3 servers as follows:
Node1: db master2, db slave1, pgpool2, slony-1 replication of master2 to slave2.
Node2: db master3, db slave2, pgpool2, slony-1 replication of master3 to slave3.
Node3: db master1, db slave3, pgpool2, slony-1 replication of master1 to slave1.

There is apache server on every Node that serve php pages. Read queries are sent to its slave
only (which is on the same server to prevent network traffic).
No i must configure the memory parameters of the postgres for the master and for the slave, because the slave must use much memory and writes the replicated data fast and the master must be fast writing.
Also how to configure the max_connections, now i set them to 250, but i think to decrease them to 200 bcause i have pgpool infront of every db server.
The database is not so big right now, but it will grow fast. I expect to have 10^5 simultanious users at the end, but when this happens the hardware will be changed, may be and other things.
Now the servers are dual core CPU 2.6 with 1.7 GB RAM and i standart disk. (the small instance from AWS)

The slave (read-only) has
shared_buffers = 128MB
effective_cache_size = 1GB
max_connections = 250
everything else is default
The master(write-only) has default settings

-----------------------------------------------------------------
Не бъди безразличен-попълни анкетата за Рак на гърдата
http://utrezavseki.org/campaigns.html#anketa_utre_za_vseki

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andy Colson 2010-07-21 14:14:11 Re: Using more tha one index per table
Previous Message Scott Marlowe 2010-07-21 08:03:28 Re: Using more tha one index per table