|
|||||||||||
|
Replication issues, slaves falling "behind"
From: Matt Juszczak <matt(at)atopia.net>
Date: Thu Aug 09 2007 - 11:42:56 EDT
I've got a three server setup. Master, and two slaves. Both slaves replicate from the master. I've tweaked the two slaves as best as I possibly can, and all performance indicators look good. However, a script running keeps seeing the seconds behind master falling behind 3-4, sometimes 10, and even 20 seconds. I've trapped these, and most of the time, the reason is either that a replicated query is taking too long to run, which shouldn't happen, because many times they are just simple updates on myisam tables using indexes (an explain confirms this). Sometimes, the table is InnoDB. It really is random on what causes it, but a "show processlist" on the slaves show replication lagged because of either replicated and/or direct queries taking forever, but again, that specific query only "takes forever" sometimes. I believe I've tuned these two slaves the best I can. Here's what I've got.. | Key_read_requests | 1672843810 | This looks good, the ratio is great... | Key_write_requests | 12696602 | Less than 1, which is good. | Threads_cached | 15 | Thread caching turned on, threads created not increasing substantially... a few per minute, if that. | Innodb_buffer_pool_pages_data | 462 | InnoDB buffers looking good. | Created_tmp_disk_tables | 821424 | I just noticed this actually. Is that too high of a ratio? About 13% of our temporary tables are going to disk. Query caching is turned on... | Table_locks_immediate | 11399631 | As far as locking is concerned, the locks_waited value is increasing, but its no where near the value of table_locks_immediate, which provides for a great ratio. Sure, maybe the table_locks_waited is a bit high anyway, and that could be causing a bunch of problems. Anyway, was wondering if anyone had any ideas. Thanks, Matt -- MySQL Replication Mailing List For list archives: http://lists.mysql.com/replication To unsubscribe: http://lists.mysql.com/replication?unsub=lists@pantek.comReceived on Thu Aug 9 11:43:11 2007 This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:30:25 EDT |
||||||||||
|
|||||||||||