- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我设法(在此处的一些帮助下)设置了从运行 mysql 5.6 (centos 6) 的主服务器到运行 Mariadb 10.1.22 (Centos 7) 的从属服务器的复制。
我现在的问题是,我有另一台服务器具有确切的 mariadb 版本和规范,但它的复制没有 catch ,相反它正在增加。
开始时它落后 48000 秒,几分钟后迅速下降到 46000 秒。之后,它正在稳步增加。 ATM的写入几乎回到了48K秒
Show full processlist;
显示 sql 线程花费长达 8 秒的时间运行 Update_rows_log_event::ha_update_row(-1)
从所有谷歌搜索我找不到它的意思。
MariaDB [(none)]> show full processlist;
+-----+------------------+---------------------------------------+--------------+---------+------+------------------------------------------+-----------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+-----+------------------+---------------------------------------+--------------+---------+------+------------------------------------------+-----------------------+----------+
| 3 | system user | | NULL | Connect | 3640 | Queueing master event to the relay log | NULL | 0.000 |
| 2 | system user | | NULL | Connect | 5 | Update_rows_log_event::ha_update_row(-1) | NULL | 0.000 |
我还发现了一个简单的 UPDATE table SET timestamp = NOW() WHERE static_ip = 'a-valid-ip' AND process_id = '13217'
最多需要 6 秒,而表具有 static_ip和 process_id 列作为 PK,直接执行该命令需要 0.078 秒。
/etc/my.cnf 的内容
[mysqld]
max_allowed_packet = 1G
max_connections = 600
thread_cache_size = 16
query_cache_size = 64M
tmp_table_size= 512M
max_heap_table_size= 512M
wait_timeout=60
#Innodb Settings
innodb_file_per_table=1
innodb_buffer_pool_size = 25G
innodb_log_file_size = 2048M
innodb_flush_log_at_trx_commit = 0
innodb_file_format = Barracuda
innodb_flush_neighbors = 0
#Log
log-error =/var/log/error.log
tmpdir = /dev/shm
#Replication SLAVE
server-id=6
slave-skip-errors=1062
my.cnf 与运行正常的服务器相同,除了 slave-id。
对正在发生的事情有什么建议/帮助吗?
谢谢。
最佳答案
在 mariadb 人员的帮助下,ha_update_rows 不相关,缓慢的原因是机器上的双磁盘故障。
[root@ser3 ~]# dd if=/dev/zero of=/tmp/output conv=fdatasync bs=384k count=1k;
1024+0 records in
1024+0 records out
402653184 bytes (403 MB) copied, 43.1096 s, 9.3 MB/s
这是一个 SSD。
关于Mysql 复制落后于 Update_rows_log_event::ha_update_row(-1),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43256936/
我设法(在此处的一些帮助下)设置了从运行 mysql 5.6 (centos 6) 的主服务器到运行 Mariadb 10.1.22 (Centos 7) 的从属服务器的复制。 我现在的问题是,我有另
我是一名优秀的程序员,十分优秀!