From: Erwan Ben Souiden Date: January 27 2010 2:30pm Subject: Re: Replication Speed List-Archive: http://lists.mysql.com/replication/1793 Message-Id: <44a7fe8c1001270630id8f3858x44659b7fca7b04ef@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Miguel, 2010/1/27 Miguel Ara=FAjo : > Hello. > > I want to measure replication speed for a great number of replicas. By th= at 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 i= n order to compare them (compare by time, the log position on the master no= de 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 s= lave'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 o= n 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=FAjo > Excuse my poor english level :) /Erwan > > > -- > MySQL Replication Mailing List > For list archives: http://lists.mysql.com/replication > To unsubscribe: =A0 =A0http://lists.mysql.com/replication?unsub=3Derwan@a= leikoum.net > >