12:00-12:10: do transaction (or ALTER or ...) that takes 10 minutes
12:10: it replicates to slave and starts running there (Behind=10 min)
12:18: do something quick on master, and replicate it.
12:20: long thing finishes on slave (just before finishing, Behind=20
min <-- sort of a lie)
12:20: next query starts (Behind=2 min <-- more realistic)
MySQL Geeks - Consulting & Review
> -----Original Message-----
> From: Marcus Bointon [mailto:marcus@stripped]
> Sent: Monday, September 08, 2008 12:21 PM
> To: Rick James
> Cc: Timo; replication@stripped
> Subject: Re: mysql Replication is too slow
> On 8 Sep 2008, at 18:33, Rick James wrote:
> > * Slave hardware should be at least as powerful as master.
> I find this really isn't a problem. I run a slave with much less CPU
> and disk, and it has no trouble keeping up because it's not
> having to
> do all the other things that the master does. It does lag
> when I post
> big transactions, but that's mainly due to a lack of speed on the
> master, not the slave.
> > * When there are long-running queries Seconds_Behind_Master lies,
> > but you say it is consistently > 300 sec?
> It certainly shouldn't be consistently behind whatever you do. The
> only way I can think of that happening is if you often run
> transactions that take about 10 minutes to run, in which case
> you will
> often be in that state, as transactions do not get replicated until
> they commit (so the slaves never have to do rollbacks).
> Marcus Bointon
> Synchromedia Limited: Creators of http://www.smartmessages.net/
> UK resellers of info@hand CRM solutions
> marcus@stripped | http://www.synchromedia.co.uk/