本帖最后由 奔跑的犀牛 于 2023-11-17 09:31 编辑 环境: GreatSQL 8.0.32 银河麒麟V10 鲲鹏920 使用mysqldump导出200M左右的数据,命令如下: mysqldump -uroot --default-character-set=utf8mb4 --max-allowed-packet=1073741824 --socket=/tmp/testdb1.sock --databases testdb \ --set-gtid-purged=OFF \ --routines \ --triggers \ --events \ --skip-lock-tables \ --skip-opt \ --add-drop-table=false \ --create-options \ --quick \ --disable-keys \ -p > testdb_20231110.sql 命令hang。。。 此时观察输出文件大小保持为: -rw-r--r-- 1 admin admin 108353886 Nov 17 09:07 testdb_20231110.sql 强制退出mysqldump后,发现mysqld的cpu仍然持续很高: top - 09:23:49 up 94 days, 19:25, 3 users, load average: 21.00, 20.48, 14.96 Tasks: 1013 total, 1 running, 1012 sleeping, 0 stopped, 0 zombie %Cpu(s): 21.9 us, 0.0 sy, 0.0 ni, 78.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 194714.1 total, 20198.8 free, 150804.4 used, 23710.9 buff/cache MiB Swap: 65535.9 total, 62955.6 free, 2580.3 used. 36763.7 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3995768 admin 20 0 145.5g 8.3g 37888 S 2106 4.4 412:41.70 mysqld 登录到greatsql中,可以发现之前强制退出的三个mysqldump,线程仍然还在: +----+-----------------+-----------------------+--------+---------+------+------------------------+---------------------------------------------------------+---------+-----------+---------------+ | Id | User | Host | db | Command | Time | State | Info | Time_ms | Rows_sent | Rows_examined | +----+-----------------+-----------------------+--------+---------+------+------------------------+---------------------------------------------------------+---------+-----------+---------------+ | 5 | event_scheduler | localhost | NULL | Daemon | 2034 | Waiting on empty queue | NULL | 2033492 | 0 | 0 | | 17 | root | localhost | testdb | Query | 1776 | executing | SELECT /*!40001 SQL_NO_CACHE */ * FROM `audit_job` | 1775668 | 140588 | 0 | | 28 | root | localhost | testdb | Query | 1290 | executing | SELECT /*!40001 SQL_NO_CACHE */ * FROM `audit_job` | 1289440 | 140443 | 0 | | 38 | root | localhost | testdb | Query | 1224 | executing | SELECT /*!40001 SQL_NO_CACHE */ * FROM audit_job` | 1223870 | 140588 | 0 | |
yejr
2023-11-17 14:17:24
| ||
奔跑的犀牛
2023-11-17 15:36:58
| ||
奔跑的犀牛
2023-11-17 15:41:08
| ||
yejr
2023-11-17 17:39:56
| ||
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com