List:Replication« Previous MessageNext Message »
From:Erwan Ben Souiden Date:January 27 2010 2:30pm
Subject:Re: Replication Speed
View as plain text  
Hi Miguel,

2010/1/27 Miguel Araújo <noradone@stripped>:
> Hello.
>
> I want to measure replication speed for a great number of replicas. By that I mean
> how soon an event arrives at the slave after being logger to the master's binary log.
>
> So, I've started developing an application to read the replication logs in order to
> compare them (compare by time, the log position on the master node with the log position
> on the slave's). My first approach was to use the mysqlbinlog to get the log position, in
> the 'Master_Log_File'. But in the slave's the last position that the SQL thread has read
> and executed is the 'Relay_Log_Pos', right?
> I have to read the slave's relay log, in order to get the last position on the
> Master's log executed? And compare with the master's log?
>

May be the field "Seconds_Behind_Master" could help you ? (when you
run "SHOW SLAVE STATUS" on your slave)

according to the mysql doc (
http://dev.mysql.com/doc/refman/5.0/en/replication-faq.html#qandaitem-16-3-4-1-3
) :
"When the slave SQL thread executes an event read from the master, it
modifies its own time to the event timestamp. (This is why TIMESTAMP
is well replicated.) In the Time column in the output of SHOW
PROCESSLIST, the number of seconds displayed for the slave SQL thread
is the number of seconds between the timestamp of the last replicated
event and the real time of the slave machine. You can use this to
determine the date of the last replicated event. Note that if your
slave has been disconnected from the master for one hour, and then
reconnects, you may immediately see Time  values like 3600 for the
slave SQL thread in SHOW PROCESSLIST. This is because the slave is
executing statements that are one hour old. "


> Thank you.
>
> Regards,
> Miguel Araújo
>

Excuse my poor english level :)
/Erwan

>
>
> --
> MySQL Replication Mailing List
> For list archives: http://lists.mysql.com/replication
> To unsubscribe:    http://lists.mysql.com/replication?unsub=1
>
>
Thread
Replication SpeedMiguel Araújo27 Jan
  • Re: Replication SpeedErwan Ben Souiden27 Jan
    • Re: Replication Speedsureshkumarilu27 Jan
  • Re: Replication SpeedMarcus Bointon27 Jan
  • Re: Replication SpeedJohan De Meersman27 Jan
    • Re: Replication SpeedMiguel Araújo27 Jan
      • Re: Replication SpeedSuresh Kuna27 Jan
        • Re: Replication SpeedMiguel Araújo27 Jan
          • Re: Replication SpeedSuresh Kuna27 Jan
            • Re: Replication SpeedMiguel Araújo27 Jan
              • Re: Replication SpeedSuresh Kuna27 Jan
                • Re: Replication SpeedRick James27 Jan
  • Re: Replication SpeedAndrej Pintar27 Jan
Re: Replication SpeedMiguel Araújo27 Jan