I just read this blog post about relay-log-space-limit on MySQL. I am convinced that the 'unlimited' default is indeed not very good. But how do I choose a good value for it?
We are using master-master circular replication if that would matter.
|
I just read this blog post about relay-log-space-limit on MySQL. I am convinced that the 'unlimited' default is indeed not very good. But how do I choose a good value for it? We are using master-master circular replication if that would matter. |
|||
|
|
|
That would depend on four(4) factors
With What if the SQL thread breaks due to some SQL error? You need to resolve the error with the number of days set by What if the IO thread breaks due to some communication error? This could be more critical if the last relay log gets logically corrupted (a possibility). Once Communication between Master and Slave is known to be OK, you must get
from
This will erase all relay logs and start over with a fresh set. EXAMPLEI have a DB Hosting client that generates a full 1GB binary log every 18 minutes (Yes, 80GB a day). Since client has expire_logs_days = 3, client has 240 GB a day. Picture the above scenarios and trying to deal with them without have the right alerts in place or enough diskspace of relay logs. This gets more complicated since with Circular Replication because binary logs and relay logs share the same space by default. Perhaps stored binary logs on a separate disk can help mitigate some diskspace issues. RECOMMENDATIONIf you can get to fix replication errors quickly or if diskspace is at a premium, you could set You may want to determine how much space you crank for binary logs in one hour and set |
||||
|
|