Brad Nicholson bnichols
Thu Jan 25 08:24:58 PST 2007
On Thu, 2007-01-25 at 08:59 +0100, Brinon Philippe wrote:
> Hello everybody, 
> 
>  
> 
> We would like to know if there is a way to simplify the management of
> SLONY in the case of a simple master-to-slave replication process.
> 
>  
> 
> Here is our structure: we have one master and 10 slaves, running
> properly. 

Can I ask what you need 10 subscribers for?

> We do not expect any of the slaves to become a master some day.
> Everything is running well, except that there is a tremendous activity
> on the master server due to the numerous SLONY processes. The activity
> on each slave node is also far from being null even when there is
> nothing to replicate.

What slony processes?  Do you mean the Postgres processes that slony is
using, or the slon processes?  If you mean the slon processes, run the
slons on a different server.
> 
> Considering that the relationships between slave nodes were of no use
> in our situation, we have decided, on a test configuration, to
> suppress all the listen paths which seemed unuseful and to keep only
> the 20 obviously useful listen paths. On the same way, we have kept
> only the 20 minimum paths between the master and each slave. Under
> this new test configuration, everything continued to run properly, the
> slave nodes had there CPU activity being reduced. However, the master
> CPU activity continued to be tremendous.
> 
>  
> 
> On a second step, we noticed first that the table sl_listen continued
> to have 110 lines even if we had specified 20 listen paths.
> Consequently, we cleaned each sl_listen table of each node of the
> SLONY cluster in order to have a consistent situation. After a couple
> of hours, we have noted that the CPU activity of the master node as
> well as the CPU activity of the slave nodes have been considerably
> reduced, despite the big number of SLONY processes remaining on each
> node (55 on the master and 15 on each slave).
> 
>  
> 
> Our questions are: 
> 
> 1- Is there a way to configure SLONY so that we can obtain the same
> good results in terms of CPU use without cleaning manually the
> SL_LISTEN tables?
> 
What version of slony are you running?  STORE LISTEN/DROP LISTEN were
no-ops for a while (most, if not all of the 1.5 branch, I believe).
This has been fixed in 1.2

> 2- Is there a way to minimize the number of SLONY processes on the
> master and slave nodes?

Sure, the easiest way is reduce the number of subscribers.
> 
Secondly, are you trying to optimize for the provider, or the
subscribers?  If the answer is for the provider - use cascaded replicas
(have the provider A to only one other node - B. Then chain the rest of
the nodes off B. 

> 3- Which parameters is it possible to change in order to minimize the
> activity of the master and slaves?

Hmm, I'm not sure about this one, but I wonder about setting forward='f'
on the subscribers that will never need to be promoted to master.  They
will stop collecting sl_log data - in theory that should reduce your
activity.
> 
> 4- Is it possible to configure the system so that the replication is
> decided by the master node whenever necessary?

I'm not sure what you mean here.

Brad Nicholson  416-673-4106
Database Administrator, Afilias Canada Corp.




More information about the Slony1-general mailing list