GreatSQL社区

搜索

[待回复] greatsql 批量执行update指令时cpu利用率突然拉满

293 11 5 天前
本帖最后由 紫川 于 2025-7-22 18:40 编辑

你好,我请教你们一个问题,我们这边适配万里数据库的时候,程序批量执行update语句时会导致数据库的cpu利用率过高,其它select,insert都是正常的。我想请问下,你们又遇到过类似的问题没 (手动update就能复现)  版本是:GreatSQL-8.0.32-25-Linux-glibc2.28-aarch64
企业微信截图_17531776586559.png
企业微信截图_17531776693545.png
全部回复(11)
yejr 4 天前
请补充该表DDL以及相应的执行计划

另外,建议用最新的GreatSQL 8.0.32-27版本,而不是8.0.32-25版本哈
紫川 4 天前
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)[root@GreatSQL][emanager]>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 4 天前
紫川 发表于 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 运行一二分钟后的结果
紫川 4 天前
yejr 发表于 2025-7-23 10:37
不好意思,忘了提醒

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

Configuration is default my.cnf
  1. #
  2. # my.cnf example for GreatSQL
  3. #
  4. # The following parameter settings are for reference only, and it is assumed that the server has 256G available memory
  5. #
  6. [client]
  7. socket    = /data/GreatSQL/mysql.sock
  8. [mysql]
  9. loose-skip-binary-as-hex
  10. prompt = "(\\D)[\\u@GreatSQL][\\d]>"
  11. no-auto-rehash
  12. [mysqld]
  13. user    = mysql
  14. port    = 3306
  15. server_id = 3306
  16. basedir = /usr/
  17. datadir    = /data/GreatSQL
  18. socket    = /data/GreatSQL/mysql.sock
  19. pid-file = mysql.pid
  20. character-set-server = UTF8MB4
  21. skip_name_resolve = 1
  22. lower_case_table_names = 1
  23. # If your database primarily runs overseas, please adjust this parameter according to your actual situation
  24. default_time_zone = "+8:00"
  25. bind_address = "0.0.0.0"
  26. plugin_dir = /usr/local/GreatSQL-8.0.32-25-Linux-glibc2.28-aarch64/lib/plugin

  27. #performance setttings
  28. lock_wait_timeout = 3600
  29. open_files_limit    = 65535
  30. back_log = 1024
  31. max_connections = 1024
  32. max_connect_errors = 1000000
  33. table_open_cache = 4096
  34. table_definition_cache = 2048
  35. sort_buffer_size = 4M
  36. join_buffer_size = 4M
  37. read_buffer_size = 8M
  38. read_rnd_buffer_size = 4M
  39. bulk_insert_buffer_size = 64M
  40. thread_cache_size = 768
  41. interactive_timeout = 600
  42. wait_timeout = 600
  43. tmp_table_size = 96M
  44. max_heap_table_size = 96M
  45. max_allowed_packet = 64M
  46. net_buffer_shrink_interval = 180
  47. #GIPK
  48. loose-sql_generate_invisible_primary_key = ON

  49. #log settings
  50. log_timestamps = SYSTEM
  51. log_error = /data/GreatSQL/error.log
  52. log_error_verbosity = 3
  53. slow_query_log = 1
  54. log_slow_extra = 1
  55. slow_query_log_file = /data/GreatSQL/slow.log
  56. # Set slow log file size to 1G and total file count to 10
  57. max_slowlog_size = 1073741824
  58. max_slowlog_files = 10
  59. long_query_time = 0.01
  60. log_queries_not_using_indexes = 1
  61. log_throttle_queries_not_using_indexes = 60
  62. min_examined_row_limit = 100
  63. log_slow_admin_statements = 1
  64. log_slow_replica_statements = 1
  65. log_slow_verbosity = FULL
  66. log_bin = /data/GreatSQL/binlog
  67. binlog_format = ROW
  68. sync_binlog = 1
  69. binlog_cache_size = 4M
  70. max_binlog_cache_size = 6G
  71. max_binlog_size = 1G
  72. # Control the total size of binlog to prevent disk space from being exhausted
  73. binlog_space_limit = 500G
  74. binlog_rows_query_log_events = 1
  75. binlog_expire_logs_seconds = 604800
  76. binlog_checksum = CRC32
  77. binlog_order_commits = OFF
  78. gtid_mode = ON
  79. enforce_gtid_consistency = TRUE

  80. #myisam settings
  81. key_buffer_size = 32M
  82. myisam_sort_buffer_size = 128M

  83. #replication settings
  84. relay_log_recovery = 1
  85. replica_parallel_type = LOGICAL_CLOCK
  86. # The number of parallel replication threads can be set to twice the number of logical CPUs
  87. replica_parallel_workers = 64
  88. binlog_transaction_dependency_tracking = WRITESET
  89. replica_preserve_commit_order = 1
  90. replica_checkpoint_period = 2

  91. # Enable InnoDB parallel query optimization feature
  92. loose-force_parallel_execute = OFF
  93. # Set the maximum concurrent degree of parallel query for each SQL statement
  94. loose-parallel_default_dop = 8
  95. # Set the total number of parallel query threads in the system, can be the same as the maximum logical CPU count
  96. loose-parallel_max_threads = 64
  97. # 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
  98. loose-parallel_memory_limit = 2G

  99. # Parallel load data
  100. loose-gdb_parallel_load_chunk_size = 4M

  101. #rapid engine
  102. loose-rapid_memory_limit = 12G
  103. loose-rapid_worker_threads = 32
  104. loose-secondary_engine_parallel_load_workers = 16

  105. #mgr settings
  106. loose-plugin_load_add = 'mysql_clone.so'
  107. loose-plugin_load_add = 'group_replication.so'
  108. loose-group_replication_group_name = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa1"
  109. # MGR local node IP:PORT, please replace it yourself
  110. loose-group_replication_local_address = "172.16.16.10:33061"
  111. # MGR cluster all node IP:PORT, please replace it yourself
  112. loose-group_replication_group_seeds = '172.16.16.10:33061,172.16.16.12:33061,172.16.16.12:33061'
  113. loose-group_replication_start_on_boot = ON
  114. loose-group_replication_bootstrap_group = OFF
  115. loose-group_replication_exit_state_action = READ_ONLY
  116. loose-group_replication_flow_control_mode = "DISABLED"
  117. loose-group_replication_single_primary_mode = ON
  118. loose-group_replication_enforce_update_everywhere_checks=0
  119. loose-group_replication_majority_after_mode = ON
  120. loose-group_replication_communication_max_message_size = 10M
  121. loose-group_replication_arbitrator = 0
  122. loose-group_replication_single_primary_fast_mode = 1
  123. loose-group_replication_request_time_threshold = 100
  124. loose-group_replication_primary_election_mode = GTID_FIRST
  125. loose-group_replication_unreachable_majority_timeout = 0
  126. loose-group_replication_member_expel_timeout = 5
  127. loose-group_replication_autorejoin_tries = 288
  128. loose-group_replication_recovery_get_public_key = ON

  129. #mgr vip
  130. loose-plugin_load_add = 'greatdb_ha.so'
  131. loose-greatdb_ha_enable_mgr_vip = 0
  132. loose-greatdb_ha_mgr_vip_nic = 'eth0'
  133. loose-greatdb_ha_mgr_vip_ip = '172.16.16.252'
  134. loose-greatdb_ha_mgr_vip_mask = '255.255.255.0'
  135. loose-greatdb_ha_port = 33062
  136. loose-greatdb_ha_mgr_read_vip_ips = "172.16.16.251"
  137. #loose-greatdb_ha_mgr_read_vip_ips = "172.16.16.251,172.16.16.252"
  138. loose-greatdb_ha_mgr_read_vip_floating_type = "TO_ANOTHER_SECONDARY"
  139. loose-greatdb_ha_send_arp_packge_times = 5
  140. report_host = 172.16.16.10
  141. report_port = 3306

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

  144. # InnoDB settings
  145. innodb_buffer_pool_size = 16G
  146. innodb_buffer_pool_instances = 8
  147. innodb_data_file_path = ibdata1:12M:autoextend
  148. innodb_flush_log_at_trx_commit = 1
  149. innodb_log_buffer_size = 64M
  150. innodb_log_file_size = 2G
  151. innodb_log_files_in_group = 3
  152. innodb_redo_log_capacity = 6G
  153. innodb_doublewrite_files = 2
  154. innodb_doublewrite_pages = 128
  155. innodb_max_undo_log_size = 4G
  156. # Adjust appropriately based on your server's IOPS capacity
  157. # For general SSDs, it can be adjusted to 10000 - 20000
  158. # For high-end PCIe SSD cards, it can be adjusted even higher, such as 50000 - 80000
  159. innodb_io_capacity = 10000
  160. innodb_io_capacity_max = 20000
  161. innodb_open_files = 65534
  162. # Reminder: When using the CLONE encryption feature, do not select the O_DIRECT mode, otherwise it will be slower
  163. innodb_flush_method = O_DIRECT
  164. innodb_use_fdatasync = ON
  165. innodb_lru_scan_depth = 4000
  166. innodb_lock_wait_timeout = 10
  167. innodb_rollback_on_timeout = 1
  168. innodb_print_all_deadlocks = 1
  169. innodb_online_alter_log_max_size = 4G
  170. innodb_print_ddl_logs = 1
  171. innodb_status_file = 1
  172. innodb_status_output = 0
  173. innodb_status_output_locks = 1
  174. innodb_sort_buffer_size = 64M
  175. innodb_adaptive_hash_index = 0
  176. innodb_numa_interleave = OFF
  177. innodb_spin_wait_delay = 20
  178. innodb_print_lock_wait_timeout_info = 1
  179. # Kill idle transactions after 5 minutes of inactivity to prevent row locks from being held for too long
  180. kill_idle_transaction = 300
  181. # Asynchronous cleanup of large tables
  182. innodb_data_file_async_purge = ON

  183. # innodb monitor settings
  184. # 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"

  185. #pfs settings
  186. performance_schema = 1
  187. #performance_schema_instrument = '%memory%=on'
  188. performance_schema_instrument = '%lock%=on'
复制代码
      
  1. (Wed Jul 23 10:47:43 2025)[root@GreatSQL][emanager]>SHOW PROCESSLIST;
  2. +--------+-----------------+-----------------+----------+---------+--------+------------------------+------------------+-----------+-----------+---------------+
  3. | Id     | User            | Host            | db       | Command | Time   | State                  | Info             | Time_ms   | Rows_sent | Rows_examined |
  4. +--------+-----------------+-----------------+----------+---------+--------+------------------------+------------------+-----------+-----------+---------------+
  5. |      8 | event_scheduler | localhost       | NULL     | Daemon  | 342697 | Waiting on empty queue | NULL             | 342697368 |         0 |             0 |
  6. |    191 | root            | 127.0.0.1:53984 | emanager | Sleep   |      0 |                        | NULL             |       239 |         0 |             0 |
  7. |    192 | root            | 127.0.0.1:53986 | emanager | Sleep   |      1 |                        | NULL             |      1101 |         0 |             0 |
  8. |    193 | root            | 127.0.0.1:53988 | emanager | Sleep   |      1 |                        | NULL             |      1101 |         0 |             0 |
  9. |    194 | root            | 127.0.0.1:53990 | emanager | Sleep   |      1 |                        | NULL             |      1101 |         0 |             0 |
  10. |    195 | root            | 127.0.0.1:53992 | emanager | Sleep   |      1 |                        | NULL             |      1101 |         0 |             0 |
  11. |    196 | root            | 127.0.0.1:53994 | emanager | Sleep   |      4 |                        | NULL             |      4103 |         0 |             0 |
  12. |    197 | root            | 127.0.0.1:53996 | emanager | Sleep   |      4 |                        | NULL             |      4103 |         0 |             0 |
  13. |    198 | root            | 127.0.0.1:53998 | emanager | Sleep   |      4 |                        | NULL             |      4102 |         0 |             0 |
  14. |    199 | root            | 127.0.0.1:54000 | emanager | Sleep   |     21 |                        | NULL             |     21558 |         0 |             0 |
  15. |    200 | root            | 127.0.0.1:54002 | emanager | Sleep   |     27 |                        | NULL             |     27560 |         0 |             0 |
  16. |    201 | root            | 127.0.0.1:54004 | emanager | Sleep   |     27 |                        | NULL             |     27560 |         0 |             0 |
  17. |    202 | root            | 127.0.0.1:54006 | emanager | Sleep   |     26 |                        | NULL             |     26560 |         0 |             0 |
  18. |    203 | root            | 127.0.0.1:54008 | emanager | Sleep   |     26 |                        | NULL             |     26559 |         0 |             0 |
  19. |    204 | root            | 127.0.0.1:54010 | emanager | Sleep   |     21 |                        | NULL             |     21558 |         0 |             0 |
  20. |    205 | root            | 127.0.0.1:54012 | emanager | Sleep   |     21 |                        | NULL             |     21558 |         0 |             0 |
  21. |    206 | root            | 127.0.0.1:54014 | emanager | Sleep   |      1 |                        | NULL             |      1554 |         0 |             0 |
  22. | 582603 | root            | localhost       | emanager | Query   |      0 | init                   | SHOW PROCESSLIST |         0 |         0 |             0 |
  23. +--------+-----------------+-----------------+----------+---------+--------+------------------------+------------------+-----------+-----------+---------------+
复制代码
                  
  1. =====================================
  2. 2025-07-23 10:48:29 281437469798272 INNODB MONITOR OUTPUT
  3. =====================================
  4. Per second averages calculated from the last 11 seconds
  5. -----------------
  6. BACKGROUND THREAD
  7. -----------------
  8. srv_master_thread loops: 34 srv_active, 0 srv_shutdown, 342587 srv_idle
  9. srv_master_thread log flush and writes: 0
  10. ----------
  11. SEMAPHORES
  12. ----------
  13. OS WAIT ARRAY INFO: reservation count 54199
  14. OS WAIT ARRAY INFO: signal count 51620
  15. RW-shared spins 0, rounds 0, OS waits 0
  16. RW-excl spins 0, rounds 0, OS waits 0
  17. RW-sx spins 0, rounds 0, OS waits 0
  18. Spin rounds per wait: 0.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx
  19. ------------
  20. TRANSACTIONS
  21. ------------
  22. Trx id counter 2493962
  23. Purge done for trx's n:o < 2189577 undo n:o < 0 state: running but idle
  24. History list length 0
  25. LIST OF TRANSACTIONS FOR EACH SESSION:
  26. ---TRANSACTION 562932573418808, not started
  27. 0 lock struct(s), heap size 1128, 0 row lock(s)
  28. ---TRANSACTION 562932573417960, not started
  29. 0 lock struct(s), heap size 1128, 0 row lock(s)
  30. ---TRANSACTION 562932573417112, not started
  31. 0 lock struct(s), heap size 1128, 0 row lock(s)
  32. ---TRANSACTION 562932573416264, not started
  33. 0 lock struct(s), heap size 1128, 0 row lock(s)
  34. ---TRANSACTION 562932573415416, not started
  35. 0 lock struct(s), heap size 1128, 0 row lock(s)
  36. ---TRANSACTION 562932573414568, not started
  37. 0 lock struct(s), heap size 1128, 0 row lock(s)
  38. ---TRANSACTION 562932573413720, not started
  39. 0 lock struct(s), heap size 1128, 0 row lock(s)
  40. ---TRANSACTION 562932573412872, not started
  41. 0 lock struct(s), heap size 1128, 0 row lock(s)
  42. ---TRANSACTION 562932573412024, not started
  43. 0 lock struct(s), heap size 1128, 0 row lock(s)
  44. ---TRANSACTION 562932573411176, not started
  45. 0 lock struct(s), heap size 1128, 0 row lock(s)
  46. ---TRANSACTION 562932573410328, not started
  47. 0 lock struct(s), heap size 1128, 0 row lock(s)
  48. ---TRANSACTION 562932573409480, not started
  49. 0 lock struct(s), heap size 1128, 0 row lock(s)
  50. ---TRANSACTION 562932573408632, not started
  51. 0 lock struct(s), heap size 1128, 0 row lock(s)
  52. ---TRANSACTION 562932573407784, not started
  53. 0 lock struct(s), heap size 1128, 0 row lock(s)
  54. ---TRANSACTION 562932573406936, not started
  55. 0 lock struct(s), heap size 1128, 0 row lock(s)
  56. --------
  57. FILE I/O
  58. --------
  59. I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
  60. I/O thread 1 state: waiting for completed aio requests (log thread)
  61. I/O thread 2 state: waiting for completed aio requests (read thread)
  62. I/O thread 3 state: waiting for completed aio requests (read thread)
  63. I/O thread 4 state: waiting for completed aio requests (read thread)
  64. I/O thread 5 state: waiting for completed aio requests (read thread)
  65. I/O thread 6 state: waiting for completed aio requests (write thread)
  66. I/O thread 7 state: waiting for completed aio requests (write thread)
  67. I/O thread 8 state: waiting for completed aio requests (write thread)
  68. I/O thread 9 state: waiting for completed aio requests (write thread)
  69. Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
  70. ibuf aio reads:, log i/o's:
  71. Pending flushes (fsync) log: 0; buffer pool: 1
  72. 1152 OS file reads, 217860 OS file writes, 190132 OS fsyncs
  73. 0.00 reads/s, 0 avg bytes/read, 0.59 writes/s, 0.42 fsyncs/s
  74. -------------------------------------
  75. INSERT BUFFER AND ADAPTIVE HASH INDEX
  76. -------------------------------------
  77. Ibuf: size 1, free list len 0, seg size 2, 0 merges
  78. merged operations:
  79. insert 0, delete mark 0, delete 0
  80. discarded operations:
  81. insert 0, delete mark 0, delete 0
  82. Hash table size 4425293, node heap has 0 buffer(s)
  83. Hash table size 4425293, node heap has 0 buffer(s)
  84. Hash table size 4425293, node heap has 0 buffer(s)
  85. Hash table size 4425293, node heap has 0 buffer(s)
  86. Hash table size 4425293, node heap has 0 buffer(s)
  87. Hash table size 4425293, node heap has 0 buffer(s)
  88. Hash table size 4425293, node heap has 0 buffer(s)
  89. Hash table size 4425293, node heap has 0 buffer(s)
  90. 0.00 hash searches/s, 30.36 non-hash searches/s
  91. ---
  92. LOG
  93. ---
  94. Log sequence number          54810849
  95. Log buffer assigned up to    54810849
  96. Log buffer completed up to   54810849
  97. Log written up to            54810849
  98. Log flushed up to            54810849
  99. Added dirty pages up to      54810849
  100. Pages flushed up to          54810849
  101. Last checkpoint at           54810849
  102. Log minimum file id is       0
  103. Log maximum file id is       0
  104. Modified age no less than    54810849
  105. Checkpoint age               0
  106. Max checkpoint age           5422668288
  107. 97335 log i/o's done, 0.33 log i/o's/second
  108. ----------------------
  109. BUFFER POOL AND MEMORY
  110. ----------------------
  111. Total large memory allocated 0
  112. Dictionary memory allocated 2352624
  113. Buffer pool size   1048448
  114. Buffer pool size, bytes 17177772032
  115. Free buffers       1046265
  116. Database pages     2183
  117. Old database pages 0
  118. Modified db pages  0
  119. Pending reads      0
  120. Pending writes: LRU 0, flush list 0, single page 0
  121. Pages made young 0, not young 0
  122. 0.00 youngs/s, 0.00 non-youngs/s
  123. Pages read 1126, created 1057, written 41336
  124. 0.00 reads/s, 0.00 creates/s, 0.08 writes/s
  125. Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
  126. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  127. LRU len: 2183, unzip_LRU len: 0
  128. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  129. ----------------------
  130. INDIVIDUAL BUFFER POOL INFO
  131. ----------------------
  132. ---BUFFER POOL 0
  133. Buffer pool size   131056
  134. Buffer pool size, bytes 2147221504
  135. Free buffers       130689
  136. Database pages     367
  137. Old database pages 0
  138. Modified db pages  0
  139. Pending reads      0
  140. Pending writes: LRU 0, flush list 0, single page 0
  141. Pages made young 0, not young 0
  142. 0.00 youngs/s, 0.00 non-youngs/s
  143. Pages read 160, created 207, written 296
  144. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  145. Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
  146. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  147. LRU len: 367, unzip_LRU len: 0
  148. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  149. ---BUFFER POOL 1
  150. Buffer pool size   131056
  151. Buffer pool size, bytes 2147221504
  152. Free buffers       130924
  153. Database pages     132
  154. Old database pages 0
  155. Modified db pages  0
  156. Pending reads      0
  157. Pending writes: LRU 0, flush list 0, single page 0
  158. Pages made young 0, not young 0
  159. 0.00 youngs/s, 0.00 non-youngs/s
  160. Pages read 63, created 69, written 138
  161. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  162. No buffer pool page gets since the last printout
  163. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  164. LRU len: 132, unzip_LRU len: 0
  165. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  166. ---BUFFER POOL 2
  167. Buffer pool size   131056
  168. Buffer pool size, bytes 2147221504
  169. Free buffers       130928
  170. Database pages     128
  171. Old database pages 0
  172. Modified db pages  0
  173. Pending reads      0
  174. Pending writes: LRU 0, flush list 0, single page 0
  175. Pages made young 0, not young 0
  176. 0.00 youngs/s, 0.00 non-youngs/s
  177. Pages read 64, created 64, written 150
  178. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  179. Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
  180. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  181. LRU len: 128, unzip_LRU len: 0
  182. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  183. ---BUFFER POOL 3
  184. Buffer pool size   131056
  185. Buffer pool size, bytes 2147221504
  186. Free buffers       130728
  187. Database pages     328
  188. Old database pages 0
  189. Modified db pages  0
  190. Pending reads      0
  191. Pending writes: LRU 0, flush list 0, single page 0
  192. Pages made young 0, not young 0
  193. 0.00 youngs/s, 0.00 non-youngs/s
  194. Pages read 201, created 127, written 39573
  195. 0.00 reads/s, 0.00 creates/s, 0.08 writes/s
  196. Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
  197. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  198. LRU len: 328, unzip_LRU len: 0
  199. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  200. ---BUFFER POOL 4
  201. Buffer pool size   131056
  202. Buffer pool size, bytes 2147221504
  203. Free buffers       130853
  204. Database pages     203
  205. Old database pages 0
  206. Modified db pages  0
  207. Pending reads      0
  208. Pending writes: LRU 0, flush list 0, single page 0
  209. Pages made young 0, not young 0
  210. 0.00 youngs/s, 0.00 non-youngs/s
  211. Pages read 107, created 96, written 217
  212. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  213. Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
  214. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  215. LRU len: 203, unzip_LRU len: 0
  216. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  217. ---BUFFER POOL 5
  218. Buffer pool size   131056
  219. Buffer pool size, bytes 2147221504
  220. Free buffers       130880
  221. Database pages     176
  222. Old database pages 0
  223. Modified db pages  0
  224. Pending reads      0
  225. Pending writes: LRU 0, flush list 0, single page 0
  226. Pages made young 0, not young 0
  227. 0.00 youngs/s, 0.00 non-youngs/s
  228. Pages read 55, created 121, written 142
  229. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  230. Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
  231. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  232. LRU len: 176, unzip_LRU len: 0
  233. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  234. ---BUFFER POOL 6
  235. Buffer pool size   131056
  236. Buffer pool size, bytes 2147221504
  237. Free buffers       130681
  238. Database pages     375
  239. Old database pages 0
  240. Modified db pages  0
  241. Pending reads      0
  242. Pending writes: LRU 0, flush list 0, single page 0
  243. Pages made young 0, not young 0
  244. 0.00 youngs/s, 0.00 non-youngs/s
  245. Pages read 137, created 238, written 369
  246. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  247. Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
  248. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  249. LRU len: 375, unzip_LRU len: 0
  250. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  251. ---BUFFER POOL 7
  252. Buffer pool size   131056
  253. Buffer pool size, bytes 2147221504
  254. Free buffers       130582
  255. Database pages     474
  256. Old database pages 0
  257. Modified db pages  0
  258. Pending reads      0
  259. Pending writes: LRU 0, flush list 0, single page 0
  260. Pages made young 0, not young 0
  261. 0.00 youngs/s, 0.00 non-youngs/s
  262. Pages read 339, created 135, written 451
  263. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  264. No buffer pool page gets since the last printout
  265. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  266. LRU len: 474, unzip_LRU len: 0
  267. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  268. --------------
  269. ROW OPERATIONS
  270. --------------
  271. 0 queries inside InnoDB, 0 queries in queue
  272. 0 read views open inside InnoDB
  273. 0 RW transactions active inside InnoDB
  274. Process ID=67772, Main thread ID=281438322487168 , state=sleeping
  275. Number of rows inserted 1467, updated 176, deleted 1, read 2745341
  276. 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 7.27 reads/s
  277. Number of system rows inserted 7819, updated 4459, deleted 3316, read 50910
  278. 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
  279. ----------------------------
  280. END OF INNODB MONITOR OUTPUT
  281. ============================
复制代码
                  
紫川 4 天前
紫川 发表于 2025-7-23 11:00
Configuration is default my.cnf

图片

perf top

perf top

explain

explain
紫川 4 天前

补充

低

高
yejr 4 天前

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

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

你好,我们现在升级到最新版本,没这个问题了,都是虚拟机里
12下一页
紫川

1

主题

0

博客

10

贡献

新手上路

Rank: 1

积分
18

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2025-7-27 06:02 , Processed in 0.023863 second(s), 20 queries , Redis On.
快速回复 返回顶部 返回列表