|
|||||||||||
|
RE: Replication issues, slaves falling "behind"
From: Matt Juszczak <matt(at)atopia.net>
Date: Fri Aug 10 2007 - 14:02:54 EDT
There are many different queries causing the problems. Again, I believe I've tuned as best as I possibly can, and I'm not sure why some of these queries are just taking forever at random times. Here is one that just decided to hang on insert for 10 seconds, without anything actually locking it. It was a replicated query. I've subsituted fields with field[1-9] and value[1-9], etc. It brought our seconds behind master behind to 10 seconds while inserting on the slave from the master. Show processlist (chopped off prior to query): 2 system user databasename Connect 6 update
Query:
Show create table:
`field1` int(11) NOT NULL auto_increment, `field2` datetime NOT NULL default '0000-00-00 00:00:00', `field3` varchar(128) default NULL, `field4` varchar(16) NOT NULL default '', `field5` varchar(32) default NULL, `field6` varchar(64) NOT NULL default '', `field7` varchar(100) NOT NULL default '', `field8` varchar(128) default NULL, `field9` int(1) default NULL, PRIMARY KEY (`field1`), KEY `name1` (`field2`), KEY `name2` (`field6`), KEY `name3` (`field4`), KEY `name4` (`field5`) ) ENGINE=MyISAM AUTO_INCREMENT=29484916 DEFAULT CHARSET=latin1 Show table status:
Name: tablename
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 29486074
Avg_row_length: 85
Data_length: 2506923996
Max_data_length: 281474976710655
Index_length: 1111112704
Data_free: 0
Auto_increment: 29486096
Create_time: 2007-07-19 07:55:33
Update_time: 2007-08-10 13:55:41
Check_time: 2007-08-06 16:07:58
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment: *****
Pretty busy right now on the slaves, but here's the I/O Stat and vmstat: avg-cpu: %user %nice %sys %iowait %idle 2.24 0.00 0.90 1.13 95.73
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 26.56 105.67 375.72 273221908 971416258
sda1 0.00 0.04 0.00 90774 1314
sda2 2.01 1.56 15.91 4032902 41141216
sda3 0.00 0.00 0.00 2820 3000
sda4 0.00 0.00 0.00 2 0
sda5 49.35 104.08 359.80 269095194 930270704
sdb 2.77 145.37 100.34 375861300 259432720
sdb1 13.73 145.37 100.34 375861164 259432592
avg-cpu: %user %nice %sys %iowait %idle
3.50 0.00 0.50 0.00 96.00
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 1.00 8.00 0.00 8 0
sda1 0.00 0.00 0.00 0 0
sda2 0.00 0.00 0.00 0 0
sda3 0.00 0.00 0.00 0 0
sda4 0.00 0.00 0.00 0 0
sda5 1.00 8.00 0.00 8 0
sdb 0.00 0.00 0.00 0 0
sdb1 0.00 0.00 0.00 0 0
avg-cpu: %user %nice %sys %iowait %idle
16.21 0.00 0.75 0.25 82.79
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 0.99 7.92 0.00 8 0
sda1 0.00 0.00 0.00 0 0
sda2 0.00 0.00 0.00 0 0
sda3 0.00 0.00 0.00 0 0
sda4 0.00 0.00 0.00 0 0
sda5 0.99 7.92 0.00 8 0
sdb 0.00 0.00 0.00 0 0
sdb1 0.00 0.00 0.00 0 0
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 252 25844 24724 2496240 0 0 31 60 3 2 2 1 96 1 0 0 252 25844 24724 2496240 0 0 24 0 1059 123 0 0 99 1 0 0 252 25852 24724 2496308 0 0 24 0 1187 323 0 0 99 1 0 1 252 24188 24724 2497940 0 0 1636 0 1329 605 0 0 83 16 0 1 252 20924 24732 2500992 0 0 3108 724 1562 921 1 1 74 24 0 1 252 19772 24736 2502280 0 0 1228 0 1472 773 1 0 76 23 0 0 252 19660 24740 2502412 0 0 40 0 1758 913 1 1 96 1 0 0 252 18892 24740 2503160 0 0 776 0 2268 1506 4 0 81 15 0 1 252 18444 24740 2503568 0 0 460 0 1650 883 1 0 80 190 0 252 18444 24764 2503544 0 0 12 1404 1309 340 0 0 84 16 On Fri, 10 Aug 2007, Rick James wrote: > You are hitting the other caching. -- MySQL Replication Mailing List For list archives: http://lists.mysql.com/replication To unsubscribe: http://lists.mysql.com/replication?unsub=lists@pantek.comReceived on Fri Aug 10 14:03:03 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 10:14:21 EDT |
||||||||||
|
|||||||||||