List:Replication« Previous MessageNext Message »
From:Miguel Araújo Date:January 27 2010 2:47pm
Subject:Re: Replication Speed
View as plain text  
That was my first approach, but as Suresh explained, seconds behind master may not give
the exact value. And in my case, I can't synchronize the server times precisely.

Thanks.

On Jan 27, 2010, at 2:40 PM, sureshkumarilu@stripped wrote:

> Hi
> Seconds behind master may not give the exact value because it  shows the time
> difference between the time stamp of the servers where an sql stmt executed in master and
> the same stmt in slave. We have to make sure both the server times are in sync.
> 
> Thanks
> Suresh Kuna
> MySQL DBA
> Sent from BlackBerry® on Airtel
> 
> -----Original Message-----
> From: Erwan Ben Souiden <e.bensouiden@stripped>
> Date: Wed, 27 Jan 2010 15:30:33 
> To: Miguel Araújo<noradone@stripped>
> Cc: <replication@stripped>
> Subject: Re: Replication Speed
> 
> 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
>> 
>> 
> 
> --
> 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