We have a Source Database of about 1TB, and a Replica on another server (similar architecture). We have setup Master Slave replication and delay between Master and Slave is always growing since. Master server is "hyghly" used by cron which insert/update a lot of data, but after some researches, I have to admit I'm a bit stuck.
Could you help me diagnose the cause of the problem? Many thanks for any hint
Master / Slave server specs: 24 cores / 256 GB DDR4 / NVMe
htop says CPU usage: 6% / RAM usage: ~50% / IO: up: ~0,23 Mb/s, down: ~3,5 Mb/s
MySQL variables : https://justpaste.it/mysql_variables
Mysql > show replica status \G
result:
Replica_IO_State: Waiting for master to send event <- most of the times
Source_Host: XX.XX.XX.XX (Source private IP)
Source_User: repl
Source_Port: 3306
Connect_Retry: 60
Source_Log_File: binlog.001720
Read_Source_Log_Pos: 1024908194 <- increasing normally
Relay_Log_File: Linux2-relay-bin.000296
Relay_Log_Pos: 915186810 <- increasing normally
Relay_Source_Log_File: binlog.001676
Replica_IO_Running: Yes
Replica_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Source_Log_Pos: 915186601 <- incrising normally
Relay_Log_Space: 48272449293 <- incrising normally
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Source_SSL_Allowed: No
Source_SSL_CA_File:
Source_SSL_CA_Path:
Source_SSL_Cert:
Source_SSL_Cipher:
Source_SSL_Key:
Seconds_Behind_Source: 56693 <- increasing slowly
Source_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Source_Server_Id: 1
Source_UUID: ece58e3c-5ac0-11eb-ab4b-00505601ddac
Source_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Replica_SQL_Running_State: waiting for handler commit <- most of the times
Source_Retry_Count: 86400
Source_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Source_SSL_Crl:
Source_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
Replicate_Rewrite_DB:
Channel_Name:
Source_TLS_Version:
Source_public_key_path:
Get_Source_public_key: 0
Network_Namespace: