问题:
我昨晚把Ubuntu 20.04升级了,并保留了相同的mysql conf文件,现在同一个应用程序需要45-47秒!
6.27user 0.41system 1:45.53elapsed 6%CPU (0avgtext+0avgdata 168724maxresident)k
0inputs+384outputs (0major+42056minor)pagefaults 0swaps
我尝试将"acpi ht"添加到/etc/default/grub,并重新启动计算机,以关闭电源管理,但处理器仍在低频运行,并且可能无法提高频率。
On-line CPU(s) list: 0-15
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 44
Model name: Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
Stepping: 2
Frequency boost: enabled
CPU MHz: 1599.592
CPU max MHz: 2401.0000
CPU min MHz: 1600.0000
BogoMIPS: 4799.75
Virtualization: VT-x
L1d cache: 256 KiB
L1i cache: 256 KiB
L2 cache: 2 MiB
L3 cache: 24 MiB
-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 8
[OK] InnoDB File per table is activated
[OK] InnoDB buffer pool / data size: 9.0G/2.6G
[OK] Ratio InnoDB log file size / InnoDB Buffer pool size: 1.0G * 2/9.0G should be equal 25%
[OK] InnoDB buffer pool instances: 9
[--] Number of InnoDB Buffer Pool Chunk : 72 for 9 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 99.90% (2901594 hits/ 2904524 total)
[!!] InnoDB Write Log efficiency: 75.47% (19033 hits/ 25219 total)
[OK] InnoDB log waits: 0.00% (0 waits / 6186 writes)
显示Java只在启动时使用< 1-的cpu使用量。
2113 mysql 20 0 25.7g 2.7g 36264 S 4.3 11.6 0:12.35 mysqld
353 root 20 0 0 0 0 S 2.7 0.0 0:02.99 md0_raid5
244 root 0 -20 0 0 0 I 0.7 0.0 0:00.98 kworker/10:1H-kblockd
248 root 0 -20 0 0 0 I 0.7 0.0 0:00.07 kworker/8:1H-kblockd
399 root 20 0 0 0 0 D 0.7 0.0 0:00.61 jbd2/md0-8
2372 bias 20 0 5597164 180592 27784 S 0.7 0.7 0:07.54 java
4654 user 20 0 3856 100 0 R 100.0 0.0 0:13.88 stress
4643 user 20 0 3856 100 0 R 100.0 0.0 0:13.82 stress
4645 user 20 0 134932 3272 272 R 100.0 0.0 0:13.84 stress
4646 user 20 0 3856 100 0 R 100.0 0.0 0:13.80 stress
答案1:
更新操作系统时,MySQL JDBC驱动程序的默认行为显然已更改。
https://coderanch.com/t/299833/databases/Batch-update-setAutoCommit-false
相关文章