Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Posts
    24

    Unanswered: 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.

  2. #2
    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

  3. #3
    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

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •