List:General Discussion« Previous MessageNext Message »
From:Ross Vandegrift Date:March 2 2007 2:58am
Subject:Re: Replication performance questions
View as plain text  
On Thu, Mar 01, 2007 at 03:46:56PM -0800, Gary W. Smith wrote:
> > 1) Does increasing the number of replication slaves increase query
> > latency on the master?  We're considering tiering the replication if
> > it might help - replicate the master to two slaves, each of which
> > replicates to ten clients.
> 
> The slaves should only be pulling from the log file, not querying the
> master data directly.  But yes, I guess I could cause an additional load
> on the server if there are many many slaves.  But with < 10,000 updates
> a day (that is 8 per minute, this shouldn't be much of a load at all.

This makes a lot of sense to me, and I kind of suspected the
additional slaves wouldn't really add much load.  The updates are
typically small so it not like there's much data to wait for.
>  
> > 2) Is there a chance that the insert latency is coming from the fact
> > that the table is growing so long?  At a certain point, even with
> > indexes, I imagine that the engine is going to have to do some linear
> > searching.
> 
> 
> You mentioned updates, but what about querying the data.  Do you run a
> lot of queries against the data on the master server?  We have a
> database with 50M rows in it and we have a complicated replication
> strategy for the reader just so we can take 99% of the load off the
> master.  We have a slave'd database just to run reports from (actually
> we have a load balanced cluster of them).  The master received inserts
> about 20 records/s

We have a similar setup with our database that's 1/50 the size ::-)
The master is there only to service updates from the application and
to push them to the slaves.  All reads happen locally on each slave
node.  Slaves never perform updates.

> Also, what type of database are you using?  INNODB?  MyISAM?  If you are
> running MyISAM then things can get slow on updates.

The table is MyISAM.  I searched on google a bit for info on slow
updates with MyISAM and didn't really hit it on the nose.  Can I ask
you to elaborate?

-- 
Ross Vandegrift
ross@stripped

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
	--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37
Thread
Replication performance questionsRoss Vandegrift2 Mar
  • RE: Replication performance questionsGary W. Smith2 Mar
    • RE: Replication performance questionsGary W. Smith2 Mar
    • Re: Replication performance questionsRoss Vandegrift2 Mar
      • RE: Replication performance questionsGary W. Smith2 Mar
        • Re: Replication performance questionsRoss Vandegrift2 Mar
          • RE: Replication performance questionsGary W. Smith2 Mar
            • Re: Replication performance questionsRoss Vandegrift6 Mar
              • Re: Replication performance questionsAtle Veka9 Mar