紫川 发表于 2025-7-22 18:19:55

greatsql 批量执行update指令时cpu利用率突然拉满

本帖最后由 紫川 于 2025-7-22 18:40 编辑

你好,我请教你们一个问题,我们这边适配万里数据库的时候,程序批量执行update语句时会导致数据库的cpu利用率过高,其它select,insert都是正常的。我想请问下,你们又遇到过类似的问题没 (手动update就能复现)版本是:GreatSQL-8.0.32-25-Linux-glibc2.28-aarch64

yejr 发表于 2025-7-23 10:23:17

请补充该表DDL以及相应的执行计划

另外,建议用最新的GreatSQL 8.0.32-27版本,而不是8.0.32-25版本哈

紫川 发表于 2025-7-23 10:27:54

yejr 发表于 2025-7-23 10:23
请补充该表DDL以及相应的执行计划

另外,建议用最新的GreatSQL 8.0.32-27版本,而不是8.0.32-25版本哈 ...

| enode | CREATE TABLE `enode` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`dev_no` int NOT NULL,
`dev_ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '',
`dev_port` int unsigned NOT NULL DEFAULT '0',
`dev_type` int NOT NULL COMMENT '1-dpi,2-is,3-ins,4-ans,5-ds,8-emanager',
`dev_subtype` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'Device role subtype, customized by each product line',
`prog_version` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'Current program version number, format Vx.y.z'
`prog_ver_md5` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'MD5 value corresponding to the main version installation package',
`old_prog_version` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'Version number before upgrade',
`update_time` datetime DEFAULT NULL COMMENT 'Time when this information was updated',
`online_time` datetime DEFAULT NULL COMMENT 'Program startup time',
`compile_time` datetime DEFAULT NULL COMMENT 'Program compilation time',
`status` tinyint unsigned DEFAULT '0' COMMENT 'Status:1-online,0-offline',
`abnormal_desc` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci COMMENT 'Abnormal description',
`abnormal_type` tinyint unsigned DEFAULT '0',
`probe_type` int NOT NULL COMMENT 'Combination of bits, 0x1-dpi, 0x2-is, 0x4-ins, 0x8-ans, 0x10-ds, 0x80-emanager',
`dev_ip_int` int unsigned DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
KEY `probe_type` (`probe_type`) USING BTREE,
KEY `dev_type` (`dev_type`) USING BTREE,
KEY `idx_dev_ip_int` (`dev_ip_int`),
KEY `idx_dev_ip` (`dev_ip`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='emanager-managed various program nodes enode table' |   执行计划 (Wed Jul 23 10:25:20 2025)>explain update enode set abnormal_type = 1 where id='10';
+----+-------------+-------+------------+-------+---------------+---------+---------+-------+------+----------+-------------+
| id | select_type | table | partitions | type| possible_keys | key   | key_len | ref   | rows | filtered | Extra       |
+----+-------------+-------+------------+-------+---------------+---------+---------+-------+------+----------+-------------+
|1 | UPDATE      | enode | NULL       | range | PRIMARY       | PRIMARY | 8       | const |    1 |   100.00 | Using where |
+----+-------------+-------+------------+-------+---------------+---------+---------+-------+------+----------+-------------+
1 row in set, 1 warning (0.00 sec)

yejr 发表于 2025-7-23 10:37:29

紫川 发表于 2025-7-23 10:27
| enode | CREATE TABLE `enode` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`dev_no` int N ...

不好意思,忘了提醒

执行计划麻烦改成 EXPLAIN SELECT这种风格的

另外,把my.cnf配置文件内容也贴一下

看你截图,UPDATE很快执行结束了,并没有被阻塞,可能是其他原因引起的CPU高

请补充提供 SHOW PROCESSLIST 和 SHOW ENGINE INNODB STATUS 的结果,如果可以也请补充 perf top 运行一二分钟后的结果

紫川 发表于 2025-7-23 11:00:46

yejr 发表于 2025-7-23 10:37
不好意思,忘了提醒

执行计划麻烦改成 EXPLAIN SELECT这种风格的


Configuration is default my.cnf #
# my.cnf example for GreatSQL
#
# The following parameter settings are for reference only, and it is assumed that the server has 256G available memory
#

socket    = /data/GreatSQL/mysql.sock

loose-skip-binary-as-hex
prompt = "(\\D)[\\u@GreatSQL][\\d]>"
no-auto-rehash

user    = mysql
port    = 3306
server_id = 3306
basedir = /usr/
datadir    = /data/GreatSQL
socket    = /data/GreatSQL/mysql.sock
pid-file = mysql.pid
character-set-server = UTF8MB4
skip_name_resolve = 1
lower_case_table_names = 1
# If your database primarily runs overseas, please adjust this parameter according to your actual situation
default_time_zone = "+8:00"
bind_address = "0.0.0.0"
plugin_dir = /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-aarch64/lib/plugin

#performance setttings
lock_wait_timeout = 3600
open_files_limit    = 65535
back_log = 1024
max_connections = 1024
max_connect_errors = 1000000
table_open_cache = 4096
table_definition_cache = 2048
sort_buffer_size = 4M
join_buffer_size = 4M
read_buffer_size = 8M
read_rnd_buffer_size = 4M
bulk_insert_buffer_size = 64M
thread_cache_size = 768
interactive_timeout = 600
wait_timeout = 600
tmp_table_size = 96M
max_heap_table_size = 96M
max_allowed_packet = 64M
net_buffer_shrink_interval = 180
#GIPK
loose-sql_generate_invisible_primary_key = ON

#log settings
log_timestamps = SYSTEM
log_error = /data/GreatSQL/error.log
log_error_verbosity = 3
slow_query_log = 1
log_slow_extra = 1
slow_query_log_file = /data/GreatSQL/slow.log
# Set slow log file size to 1G and total file count to 10
max_slowlog_size = 1073741824
max_slowlog_files = 10
long_query_time = 0.01
log_queries_not_using_indexes = 1
log_throttle_queries_not_using_indexes = 60
min_examined_row_limit = 100
log_slow_admin_statements = 1
log_slow_replica_statements = 1
log_slow_verbosity = FULL
log_bin = /data/GreatSQL/binlog
binlog_format = ROW
sync_binlog = 1
binlog_cache_size = 4M
max_binlog_cache_size = 6G
max_binlog_size = 1G
# Control the total size of binlog to prevent disk space from being exhausted
binlog_space_limit = 500G
binlog_rows_query_log_events = 1
binlog_expire_logs_seconds = 604800
binlog_checksum = CRC32
binlog_order_commits = OFF
gtid_mode = ON
enforce_gtid_consistency = TRUE

#myisam settings
key_buffer_size = 32M
myisam_sort_buffer_size = 128M

#replication settings
relay_log_recovery = 1
replica_parallel_type = LOGICAL_CLOCK
# The number of parallel replication threads can be set to twice the number of logical CPUs
replica_parallel_workers = 64
binlog_transaction_dependency_tracking = WRITESET
replica_preserve_commit_order = 1
replica_checkpoint_period = 2

# Enable InnoDB parallel query optimization feature
loose-force_parallel_execute = OFF
# Set the maximum concurrent degree of parallel query for each SQL statement
loose-parallel_default_dop = 8
# Set the total number of parallel query threads in the system, can be the same as the maximum logical CPU count
loose-parallel_max_threads = 64
# The maximum total memory size used by leader threads and worker threads when executing in parallel, can be set to about 5-10% of physical memory
loose-parallel_memory_limit = 2G

# Parallel load data
loose-gdb_parallel_load_chunk_size = 4M

#rapid engine
loose-rapid_memory_limit = 12G
loose-rapid_worker_threads = 32
loose-secondary_engine_parallel_load_workers = 16

#mgr settings
loose-plugin_load_add = 'mysql_clone.so'
loose-plugin_load_add = 'group_replication.so'
loose-group_replication_group_name = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa1"
# MGR local node IP:PORT, please replace it yourself
loose-group_replication_local_address = "172.16.16.10:33061"
# MGR cluster all node IP:PORT, please replace it yourself
loose-group_replication_group_seeds = '172.16.16.10:33061,172.16.16.12:33061,172.16.16.12:33061'
loose-group_replication_start_on_boot = ON
loose-group_replication_bootstrap_group = OFF
loose-group_replication_exit_state_action = READ_ONLY
loose-group_replication_flow_control_mode = "DISABLED"
loose-group_replication_single_primary_mode = ON
loose-group_replication_enforce_update_everywhere_checks=0
loose-group_replication_majority_after_mode = ON
loose-group_replication_communication_max_message_size = 10M
loose-group_replication_arbitrator = 0
loose-group_replication_single_primary_fast_mode = 1
loose-group_replication_request_time_threshold = 100
loose-group_replication_primary_election_mode = GTID_FIRST
loose-group_replication_unreachable_majority_timeout = 0
loose-group_replication_member_expel_timeout = 5
loose-group_replication_autorejoin_tries = 288
loose-group_replication_recovery_get_public_key = ON

#mgr vip
loose-plugin_load_add = 'greatdb_ha.so'
loose-greatdb_ha_enable_mgr_vip = 0
loose-greatdb_ha_mgr_vip_nic = 'eth0'
loose-greatdb_ha_mgr_vip_ip = '172.16.16.252'
loose-greatdb_ha_mgr_vip_mask = '255.255.255.0'
loose-greatdb_ha_port = 33062
loose-greatdb_ha_mgr_read_vip_ips = "172.16.16.251"
#loose-greatdb_ha_mgr_read_vip_ips = "172.16.16.251,172.16.16.252"
loose-greatdb_ha_mgr_read_vip_floating_type = "TO_ANOTHER_SECONDARY"
loose-greatdb_ha_send_arp_packge_times = 5
report_host = 172.16.16.10
report_port = 3306

# Does MGR switch to primary cause all application connections on the old primary node to be disconnected
loose-greatdb_ha_mgr_exit_primary_kill_connection_mode = 0

# InnoDB settings
innodb_buffer_pool_size = 16G
innodb_buffer_pool_instances = 8
innodb_data_file_path = ibdata1:12M:autoextend
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 64M
innodb_log_file_size = 2G
innodb_log_files_in_group = 3
innodb_redo_log_capacity = 6G
innodb_doublewrite_files = 2
innodb_doublewrite_pages = 128
innodb_max_undo_log_size = 4G
# Adjust appropriately based on your server's IOPS capacity
# For general SSDs, it can be adjusted to 10000 - 20000
# For high-end PCIe SSD cards, it can be adjusted even higher, such as 50000 - 80000
innodb_io_capacity = 10000
innodb_io_capacity_max = 20000
innodb_open_files = 65534
# Reminder: When using the CLONE encryption feature, do not select the O_DIRECT mode, otherwise it will be slower
innodb_flush_method = O_DIRECT
innodb_use_fdatasync = ON
innodb_lru_scan_depth = 4000
innodb_lock_wait_timeout = 10
innodb_rollback_on_timeout = 1
innodb_print_all_deadlocks = 1
innodb_online_alter_log_max_size = 4G
innodb_print_ddl_logs = 1
innodb_status_file = 1
innodb_status_output = 0
innodb_status_output_locks = 1
innodb_sort_buffer_size = 64M
innodb_adaptive_hash_index = 0
innodb_numa_interleave = OFF
innodb_spin_wait_delay = 20
innodb_print_lock_wait_timeout_info = 1
# Kill idle transactions after 5 minutes of inactivity to prevent row locks from being held for too long
kill_idle_transaction = 300
# Asynchronous cleanup of large tables
innodb_data_file_async_purge = ON

# innodb monitor settings
# innodb_monitor_enable = "module_innodb,module_server,module_dml,module_ddl,module_trx,module_os,module_purge,module_log,module_lock,module_buffer,module_index,module_ibuf_system,module_buffer_page,module_adaptive_hash"

#pfs settings
performance_schema = 1
#performance_schema_instrument = '%memory%=on'
performance_schema_instrument = '%lock%=on'
      (Wed Jul 23 10:47:43 2025)>SHOW PROCESSLIST;
+--------+-----------------+-----------------+----------+---------+--------+------------------------+------------------+-----------+-----------+---------------+
| Id   | User            | Host            | db       | Command | Time   | State                  | Info             | Time_ms   | Rows_sent | Rows_examined |
+--------+-----------------+-----------------+----------+---------+--------+------------------------+------------------+-----------+-----------+---------------+
|      8 | event_scheduler | localhost       | NULL   | Daemon| 342697 | Waiting on empty queue | NULL             | 342697368 |         0 |             0 |
|    191 | root            | 127.0.0.1:53984 | emanager | Sleep   |      0 |                        | NULL             |       239 |         0 |             0 |
|    192 | root            | 127.0.0.1:53986 | emanager | Sleep   |      1 |                        | NULL             |      1101 |         0 |             0 |
|    193 | root            | 127.0.0.1:53988 | emanager | Sleep   |      1 |                        | NULL             |      1101 |         0 |             0 |
|    194 | root            | 127.0.0.1:53990 | emanager | Sleep   |      1 |                        | NULL             |      1101 |         0 |             0 |
|    195 | root            | 127.0.0.1:53992 | emanager | Sleep   |      1 |                        | NULL             |      1101 |         0 |             0 |
|    196 | root            | 127.0.0.1:53994 | emanager | Sleep   |      4 |                        | NULL             |      4103 |         0 |             0 |
|    197 | root            | 127.0.0.1:53996 | emanager | Sleep   |      4 |                        | NULL             |      4103 |         0 |             0 |
|    198 | root            | 127.0.0.1:53998 | emanager | Sleep   |      4 |                        | NULL             |      4102 |         0 |             0 |
|    199 | root            | 127.0.0.1:54000 | emanager | Sleep   |   21 |                        | NULL             |   21558 |         0 |             0 |
|    200 | root            | 127.0.0.1:54002 | emanager | Sleep   |   27 |                        | NULL             |   27560 |         0 |             0 |
|    201 | root            | 127.0.0.1:54004 | emanager | Sleep   |   27 |                        | NULL             |   27560 |         0 |             0 |
|    202 | root            | 127.0.0.1:54006 | emanager | Sleep   |   26 |                        | NULL             |   26560 |         0 |             0 |
|    203 | root            | 127.0.0.1:54008 | emanager | Sleep   |   26 |                        | NULL             |   26559 |         0 |             0 |
|    204 | root            | 127.0.0.1:54010 | emanager | Sleep   |   21 |                        | NULL             |   21558 |         0 |             0 |
|    205 | root            | 127.0.0.1:54012 | emanager | Sleep   |   21 |                        | NULL             |   21558 |         0 |             0 |
|    206 | root            | 127.0.0.1:54014 | emanager | Sleep   |      1 |                        | NULL             |      1554 |         0 |             0 |
| 582603 | root            | localhost       | emanager | Query   |      0 | init                   | SHOW PROCESSLIST |         0 |         0 |             0 |
+--------+-----------------+-----------------+----------+---------+--------+------------------------+------------------+-----------+-----------+---------------+
                     =====================================
2025-07-23 10:48:29 281437469798272 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 11 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 34 srv_active, 0 srv_shutdown, 342587 srv_idle
srv_master_thread log flush and writes: 0
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 54199
OS WAIT ARRAY INFO: signal count 51620
RW-shared spins 0, rounds 0, OS waits 0
RW-excl spins 0, rounds 0, OS waits 0
RW-sx spins 0, rounds 0, OS waits 0
Spin rounds per wait: 0.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx
------------
TRANSACTIONS
------------
Trx id counter 2493962
Purge done for trx's n:o < 2189577 undo n:o < 0 state: running but idle
History list length 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 562932573418808, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573417960, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573417112, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573416264, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573415416, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573414568, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573413720, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573412872, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573412024, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573411176, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573410328, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573409480, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573408632, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573407784, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
---TRANSACTION 562932573406936, not started
0 lock struct(s), heap size 1128, 0 row lock(s)
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: , aio writes: ,
ibuf aio reads:, log i/o's:
Pending flushes (fsync) log: 0; buffer pool: 1
1152 OS file reads, 217860 OS file writes, 190132 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.59 writes/s, 0.42 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2, 0 merges
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
Hash table size 4425293, node heap has 0 buffer(s)
Hash table size 4425293, node heap has 0 buffer(s)
Hash table size 4425293, node heap has 0 buffer(s)
Hash table size 4425293, node heap has 0 buffer(s)
Hash table size 4425293, node heap has 0 buffer(s)
Hash table size 4425293, node heap has 0 buffer(s)
Hash table size 4425293, node heap has 0 buffer(s)
Hash table size 4425293, node heap has 0 buffer(s)
0.00 hash searches/s, 30.36 non-hash searches/s
---
LOG
---
Log sequence number          54810849
Log buffer assigned up to    54810849
Log buffer completed up to   54810849
Log written up to            54810849
Log flushed up to            54810849
Added dirty pages up to      54810849
Pages flushed up to          54810849
Last checkpoint at         54810849
Log minimum file id is       0
Log maximum file id is       0
Modified age no less than    54810849
Checkpoint age               0
Max checkpoint age         5422668288
97335 log i/o's done, 0.33 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 0
Dictionary memory allocated 2352624
Buffer pool size   1048448
Buffer pool size, bytes 17177772032
Free buffers       1046265
Database pages   2183
Old database pages 0
Modified db pages0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 1126, created 1057, written 41336
0.00 reads/s, 0.00 creates/s, 0.08 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 2183, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
----------------------
INDIVIDUAL BUFFER POOL INFO
----------------------
---BUFFER POOL 0
Buffer pool size   131056
Buffer pool size, bytes 2147221504
Free buffers       130689
Database pages   367
Old database pages 0
Modified db pages0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 160, created 207, written 296
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 367, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
---BUFFER POOL 1
Buffer pool size   131056
Buffer pool size, bytes 2147221504
Free buffers       130924
Database pages   132
Old database pages 0
Modified db pages0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 63, created 69, written 138
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 132, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
---BUFFER POOL 2
Buffer pool size   131056
Buffer pool size, bytes 2147221504
Free buffers       130928
Database pages   128
Old database pages 0
Modified db pages0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 64, created 64, written 150
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 128, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
---BUFFER POOL 3
Buffer pool size   131056
Buffer pool size, bytes 2147221504
Free buffers       130728
Database pages   328
Old database pages 0
Modified db pages0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 201, created 127, written 39573
0.00 reads/s, 0.00 creates/s, 0.08 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 328, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
---BUFFER POOL 4
Buffer pool size   131056
Buffer pool size, bytes 2147221504
Free buffers       130853
Database pages   203
Old database pages 0
Modified db pages0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 107, created 96, written 217
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 203, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
---BUFFER POOL 5
Buffer pool size   131056
Buffer pool size, bytes 2147221504
Free buffers       130880
Database pages   176
Old database pages 0
Modified db pages0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 55, created 121, written 142
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 176, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
---BUFFER POOL 6
Buffer pool size   131056
Buffer pool size, bytes 2147221504
Free buffers       130681
Database pages   375
Old database pages 0
Modified db pages0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 137, created 238, written 369
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 375, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
---BUFFER POOL 7
Buffer pool size   131056
Buffer pool size, bytes 2147221504
Free buffers       130582
Database pages   474
Old database pages 0
Modified db pages0
Pending reads      0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 339, created 135, written 451
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 474, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
0 RW transactions active inside InnoDB
Process ID=67772, Main thread ID=281438322487168 , state=sleeping
Number of rows inserted 1467, updated 176, deleted 1, read 2745341
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 7.27 reads/s
Number of system rows inserted 7819, updated 4459, deleted 3316, read 50910
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================
                  

紫川 发表于 2025-7-23 11:17:19

紫川 发表于 2025-7-23 11:00
Configuration is default my.cnf

图片

紫川 发表于 2025-7-23 11:28:36

紫川 发表于 2025-7-23 11:17
图片

补充

yejr 发表于 2025-7-23 12:15:24

紫川 发表于 2025-7-23 11:28
补充
你这是跑在虚机或容器中的吗,怀疑是虚机或容器方面的原因导致
另外,也有可能是在aarch64环境中部分版本的gcc编译器有问题导致,还请补充服务器运行环境以及GreatSQL是怎么编译的相关信息

紫川 发表于 2025-7-23 14:04:59

yejr 发表于 2025-7-23 12:15
你这是跑在虚机或容器中的吗,怀疑是虚机或容器方面的原因导致
另外,也有可能是在aarch64环境中部分版本 ...

是的,目前在用虚拟机测试,版本是这个GreatSQL-8.0.32-25-Linux-glibc2.28-aarch64,并没有编译

紫川 发表于 2025-7-23 15:24:57

紫川 发表于 2025-7-23 14:04
是的,目前在用虚拟机测试,版本是这个GreatSQL-8.0.32-25-Linux-glibc2.28-aarch64,并没有编译 ...

你好,我们现在升级到最新版本,没这个问题了,都是虚拟机里
页: [1] 2
查看完整版本: greatsql 批量执行update指令时cpu利用率突然拉满