From: stanimir petrov <cristal_reaver@abv.bg>
To: pgsql-performance@postgresql.org
Subject: tune memory usage for master/slave nodes in cluster
Date: Wed, 21 Jul 2010 15:42:04 +0300 (EEST)
Message-ID: <609756248.1423.1279716124148.JavaMail.apache@mail71.abv.bg> (raw)
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
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: cristal_reaver@abv.bg
Subject: Re: tune memory usage for master/slave nodes in cluster
In-Reply-To: <609756248.1423.1279716124148.JavaMail.apache@mail71.abv.bg>
* 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