If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysql replication

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-13-08, 07:08
ammad ammad is offline
Registered User
 
Join Date: Aug 2008
Posts: 24
mysql replication

Dear all,

I found that slave replication is slow or in other words slave is back from master.

in my case master have total records
+----------+
| count(*) |
+----------+
| 52433939 |
+----------+

where as slave is on

+----------+
| count(*) |
+----------+
| 50397367 |
+----------+

the total difference is 2036572.

my question is how do i force the slave or master to replicate data.

i have dedicated lan 1000Mbps for replication between master and slave, and master updates after a min.

regards.
Reply With Quote
  #2 (permalink)  
Old 08-14-08, 08:18
sassermann sassermann is offline
Registered User
 
Join Date: Aug 2002
Location: Germany
Posts: 17
I don't think that this has much to do with bandwidth as long as you don't do much more queries on your slave than on your master.

First thing to check is that the slave process is not hanging due to some error by

show slave status;

on your slave machine.

Other reasons might be that you are doing queries on your slave that lock the affected tables for a long time so that the slave is not able to process the updates in time.

- check and optimize your tables, for some reason or another there might be corrupt index files.

- check your buffer and io settings, if these are different from your master server the slave might perform slower in general (not that they have to be the same, but might not be optimized)

Andreas
Reply With Quote
  #3 (permalink)  
Old 08-14-08, 22:37
ammad ammad is offline
Registered User
 
Join Date: Aug 2008
Posts: 24
thanks Andreas,

I will optimize master dB server, your suggestions will help me to do more best in this regard.

my single table count increases rapidly, you can see my last post counts were

+----------+
| count(*) |
+----------+
| 52433939 |
+----------+
and current count on master DB are
+----------+
| count(*) |
+----------+
| 54210071 |
+----------+

I am using MySQL enterprise 5.0. can you help me, how do i get performance on this DB. should i use "Archive storage engine" on slave and "MOVE" all records till previous month to "archive_table" and leave the current month records.

or

i change the DB to MySQL 5.1 to use partitioning , only on slave?

or
DB should be changed on both Master and slave and other than MySQL e.g Oracle.................etc.

thanks
Reply With Quote
  #4 (permalink)  
Old 08-18-08, 10:13
sassermann sassermann is offline
Registered User
 
Join Date: Aug 2002
Location: Germany
Posts: 17
Hi Ammad,

trying to run different tabletypes on master and slave
servers will very likely run you into trouble as replication
is ment to give exact copy of the master server besides the
delay. So different features or restrictions of the table type
could cause failure on the replication server then replaying the
sql-log.

As I don't no very much about your table structure and row size I'm
afraid I cannot give much more hints besides that you could also think
about putting the table into a dedicated database and mount the
database directory on a dedicated harddisk if IO performance is
the bottleneck.

Andreas
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On