replication delay too much on tokudb partition table
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
New
|
Undecided
|
Unassigned |
Bug Description
Hi:
my slave is delay too much, the TPS and QPS very low, memory, io(fusion-io), cpu everything is ok.
analye the latest six binlog files, found 99% binlog event is abount table `abtest_
table message:
*******
Table: abtest_monitor_fac
Create Table: CREATE TABLE `abtest_
`day` int(11) NOT NULL COMMENT '20161022',
`time` bigint(11) NOT NULL COMMENT '201610221100',
`hash_id` bigint(20) unsigned NOT NULL COMMENT 'logic id',
`pv` bigint(20) NOT NULL COMMENT 'pv`',
`used_time` bigint(11) NOT NULL COMMENT '耗时 微秒',
`uv` bigint(20) NOT NULL COMMENT 'uv`',
`last_
PRIMARY KEY (`time`,`hash_id`),
KEY `idx_day` (`day`),
KEY `idx_last_
) ENGINE=TokuDB DEFAULT CHARSET=utf8
/*!50500 PARTITION BY RANGE COLUMNS(`time`)
(PARTITION p20161028 VALUES LESS THAN (20161029000000) ENGINE = TokuDB,
........
PARTITION p20171230 VALUES LESS THAN (20171231000000) ENGINE = TokuDB) */
+------
| table_name | PARTITION_
+------
| abtest_monitor_fac | `time` | 429 |
+------
+------
| table_name | engine | table_rows | data_gb | index_gb |
+------
| abtest_monitor_fac | TokuDB | 16723416943 | 763.579869242385 | 673.313777318224 |
+------
production environment: single master slave
version: Percona-
lscpu:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 40
On-line CPU(s) list: 0-39
Thread(s) per core: 2
Core(s) per socket: 10
Socket(s): 2
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Stepping: 4
CPU MHz: 3000.195
BogoMIPS: 5999.11
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 25600K
NUMA node0 CPU(s): 0-39
cpu used:
12:36:16 PM PID %usr %system %guest %CPU CPU Command
12:36:17 PM 5220 100.00 3.00 0.00 100.00 10 mysqld
12:36:18 PM 5220 100.00 3.00 0.00 100.00 0 mysqld
12:36:19 PM 5220 100.00 3.00 0.00 100.00 2 mysqld
12:36:20 PM 5220 100.00 2.00 0.00 100.00 1 mysqld
12:36:21 PM 5220 100.00 2.00 0.00 100.00 11 mysqld
12:36:22 PM 5220 100.00 3.00 0.00 100.00 10 mysqld
12:36:23 PM 5220 100.00 4.00 0.00 100.00 1 mysqld
12:36:24 PM 5220 100.00 4.00 0.00 100.00 11 mysqld
12:36:25 PM 5220 100.00 2.00 0.00 100.00 13 mysqld
12:36:26 PM 5220 100.00 5.00 0.00 100.00 10 mysqld
12:36:27 PM 5220 100.00 2.00 0.00 100.00 0 mysqld
12:36:28 PM 5220 100.00 3.00 0.00 100.00 10 mysqld
12:36:29 PM 5220 100.00 11.00 0.00 100.00 12 mysqld
12:36:30 PM 5220 100.00 5.00 0.00 100.00 0 mysqld
memory used:
total used free shared buffers cached
Mem: 126 123 2 0 0 48
-/+ buffers/cache: 74 51
Swap: 31 0 31
perf record message:
# Overhead sys usr Samples Command Shared Object
# ........ ........ ........ ............ ....... .......
#
15.89% 0.00% 15.89% 40054 mysqld /apps/svr/
|
--- bitmap_get_next_set
|
| handler:
| Rows_log_
| Rows_log_
| slave_worker_
| handle_slave_worker
| start_thread
|
| Rows_log_
| Rows_log_
| slave_worker_
| handle_slave_worker
| start_thread
7.30% 0.00% 7.30% 18401 mysqld /apps/svr/
|
--- ha_tokudb:
|
| handler:
| ha_partition:
| handler:
| Rows_log_
| Rows_log_
| slave_worker_
| handle_slave_worker
| start_thread
|
6.21% 0.00% 6.21% 15657 mysqld /apps/svr/
|
--- toku_db_
|
| ha_tokudb:
| ha_tokudb:
| handler:
| ha_partition:
| handler:
| Rows_log_
| Rows_log_
| slave_worker_
| handle_slave_worker
| start_thread
|
| ha_tokudb:
| handler:
| ha_partition:
| handler:
| Rows_log_
| Rows_log_
| slave_worker_
| handle_slave_worker
| start_thread
Is this a bug?
And how to fix it?
information type: | Private Security → Public |
information type: | Public → Public Security |
information type: | Public Security → Public |
tags: | added: performance tokudb |
This bug fixed in 5.6.38, 5.7.20. /github. com/mysql/ mysql-server/ commit/ 9414c7035020a19 15db56101aa7929 d8b4069d83# diff-8c78bfc758 be72b7df2306f1d 9984c47
https:/
If slave_rows_ search_ algorithms is set to TABLE_SCAN, HASH_SCAN there is a performance improvement.
set global slave_rows_ search_ algorithms= 'TABLE_ SCAN,HASH_ SCAN';