pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
36.89k stars 5.81k forks source link

Compared with v7.5.1, v8.1.0 has a 7.3% performance regression in oltp_point_select on Kylin Linux #53404

Open Yui-Song opened 3 months ago

Yui-Song commented 3 months ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. deploy a tidb cluster on Kylin Linux Advanced Server V10 (Sword) with aarch64
  2. run sysbench oltp_point_select with v7.5.1 and v8.1.0

OS & CPU info

[root@172 ~]# uname -a
Linux 172.16.6.70 4.19.90-25.22.v2101.ky10.aarch64 #1 SMP Thu Nov 24 18:18:43 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
[root@172 ~]# lscpu
架构:                           aarch64
CPU 运行模式:                   64-bit
字节序:                         Little Endian
CPU:                             64
在线 CPU 列表:                  0-63
每个核的线程数:                 1
每个座的核数:                   32
座:                             2
NUMA 节点:                      2
厂商 ID:                        HiSilicon
型号:                           0
型号名称:                       Kunpeng-920
步进:                           0x1
CPU 最大 MHz:                   2600.0000
CPU 最小 MHz:                   200.0000
BogoMIPS:                       200.00
L1d 缓存:                       4 MiB
L1i 缓存:                       4 MiB
L2 缓存:                        32 MiB
L3 缓存:                        64 MiB
NUMA 节点0 CPU:                 0-31
NUMA 节点1 CPU:                 32-63
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Not affected
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1:        Mitigation; __user pointer sanitization
Vulnerability Spectre v2:        Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
标记:                           fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fp
                                 hp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp as
                                 imdfhm

2. What did you expect to see? (Required)

No performance regression

3. What did you see instead (Required)

No performance regression on CentOS Linux 7 (Core) with Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz, but 7.3% performance regression in oltp_point_select on Kylin Linux with aarch64 v7.5.1 QPS 175680 v8.1.0 QPS 162811

image

v7.5.1 image

v8.1.0 image

4. What is your TiDB version? (Required)

8.1.0 commit d80e436e3c06004fc03ae79f896e89a2f7e2e2f6

Yui-Song commented 3 months ago

/type performance /type regression /sig planner /severity critical

Yui-Song commented 3 months ago

/label affects-8.1 /remove-label may-affects-8.1 /remove-label may-affects-7.5 /remove-label may-affects-7.1 /remove-label may-affects-6.5 /remove-label may-affects-6.1 /remove-label may-affects-5.4

D3Hunter commented 3 months ago

the increase in internal parse/compile time is expect, as in https://github.com/pingcap/tidb/pull/50650/files#diff-5dde154d0b9319b8396cd0db16a82c86f265914566cc5fec9a58c81e4ae76594R260-R262, we changed the sql from a single table query to a query with join, and it runs every 300ms.

but the drop of QPS from 176K -> 163K shouldn't be caused by this

image