GreatSQL社区

搜索

[讨论中] greatesql-8.0.32-25 压测的时候出现性能抖动

582 19 2024-4-20 09:59
全部回复(19)
yejr 2024-4-22 11:17:31
mabai 发表于 2024-4-22 10:49
1、已关闭numa
2、新增了--mysql-socket参数
3、 没有出现 类似的时间

1、已关闭numa
2、新增了--mysql-socket参数

看起来是上述这俩因素导致了性能抖动,可以再进一步采用排除法确认是哪个引起的。
mabai 2024-4-22 13:28:58
yejr 发表于 2024-4-22 11:16
请问你怎么确认延迟20分钟的呢,通过观测哪些指标

从 pmm监控   mysql group replication summary -> replication delay  & replication lag
yejr 2024-4-22 18:00:14
mabai 发表于 2024-4-22 13:28
从 pmm监控   mysql group replication summary -> replication delay  & replication lag

请提供原始对应指标,可参考这里 https://greatsql.cn/docs/8032-25 ... status-monitor.html
mabai 2024-4-23 17:10:34
本帖最后由 mabai 于 2024-4-23 17:13 编辑

yejr 发表于 2024-4-22 18:00
请提供原始对应指标,可参考这里 https://greatsql.cn/docs/8032-25/user-manual/8-mgr/4-mgr-status-mon ...

我重新用sysbench压了一下,这开始延迟直接上来了

  "defaultReplicaSet": {
        "name": "default",
        "primary": "172.16.1xx.20:3306",
        "ssl": "REQUIRED",
        "status": "OK",
        "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.",
        "topology": {
            "172.16.1xx.20:3306": {
                "address": "172.16.1xx.20:3306",
                "memberRole": "PRIMARY",
                "mode": "R/W",
                "readReplicas": {},
                "replicationLag": "applier_queue_applied",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.32"
            },
            "172.16.1xx.21:3306": {
                "address": "172.16.1xx.21:3306",
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "00:01:02.272460",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.32"
            },
            "172.16.1xx.22:3306": {
                "address": "172.16.1xx.22:3306",
                "memberRole": "SECONDARY",
                "mode": "R/O",
                "readReplicas": {},
                "replicationLag": "00:00:59.826593",
                "role": "HA",
                "status": "ONLINE",
                "version": "8.0.32"
            }
        },
        "topologyMode": "Single-Primary"
    },
    "groupInformationSourceMember": "172.16.1xx.20:3306"
}
yejr 2024-4-23 17:47:52
mabai 发表于 2024-4-23 17:10
yejr 发表于 2024-4-22 18:00
请提供原始对应指标,可参考这里 https://greatsql.cn/docs/8032-25/user-man ...

有延迟是正常的,因为MGR默认的一致性等级是最终一致性,不要求节点间实时一致。

除非提高数据一致性等级,不过这样主节点写入性能就会下降很多,详情参考 https://gitee.com/GreatSQL/Great ... deep-dive-mgr-16.md
mabai 2024-4-23 17:55:03
yejr 发表于 2024-4-23 17:47
有延迟是正常的,因为MGR默认的一致性等级是最终一致性,不要求节点间实时一致。

除非提高数据一致性等 ...

如果再这段期间发生的切换 会需要人工手动补数据么
yejr 2024-4-24 08:37:26
mabai 发表于 2024-4-23 17:55
如果再这段期间发生的切换 会需要人工手动补数据么

不需要切换或人工补数据
重点是分析出性能瓶颈产生的原因,或者提升secondary节点应用事务的效率(提升iops性能,并行回放等多种方式)
mabai 2024-4-24 09:50:10
本帖最后由 mabai 于 2024-4-24 10:55 编辑
yejr 发表于 2024-4-24 08:37
不需要切换或人工补数据
重点是分析出性能瓶颈产生的原因,或者提升secondary节点应用事务的效率(提升io ...

我把之前的数据量(100tables   200w/table)铲掉 重新然后重新导入了100张表 每张表500w 使用sysbench压,在并发达到128/256/512还是出现了tps和qps为0的情况

备注 :这一版的mgr  是原生的mysql-shell创建的(mysql-shell-8.0.32)

1641s ] thds: 256 tps: 13614.01 qps: 271880.22 (r/w/o: 190499.15/54152.04/27229.02) lat (ms,95%): 31.94 err/s: 0.00 reconn/s: 0.00
[ 1642s ] thds: 256 tps: 8791.06 qps: 176365.12 (r/w/o: 123386.80/35396.20/17582.12) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 1643s ] thds: 256 tps: 11008.96 qps: 219466.19 (r/w/o: 154166.43/43281.84/22017.92) lat (ms,95%): 41.10 err/s: 0.00 reconn/s: 0.00
[ 1644s ] thds: 256 tps: 798.14 qps: 16975.88 (r/w/o: 11173.90/4205.71/1596.27) lat (ms,95%): 943.16 err/s: 0.00 reconn/s: 0.00
[ 1645s ] thds: 256 tps: 6040.02 qps: 120800.32 (r/w/o: 84560.23/24160.06/12080.03) lat (ms,95%): 74.46 err/s: 0.00 reconn/s: 0.00
[ 1646s ] thds: 256 tps: 2962.65 qps: 59253.07 (r/w/o: 41477.15/11850.61/5925.31) lat (ms,95%): 277.21 err/s: 0.00 reconn/s: 0.00
[ 1647s ] thds: 256 tps: 2525.91 qps: 50518.12 (r/w/o: 35362.69/10103.62/5051.81) lat (ms,95%): 186.54 err/s: 0.00 reconn/s: 0.00
[ 1648s ] thds: 256 tps: 1565.89 qps: 31317.71 (r/w/o: 21922.40/6263.54/3131.77) lat (ms,95%): 219.36 err/s: 0.00 reconn/s: 0.00
[ 1649s ] thds: 256 tps: 2400.27 qps: 48005.39 (r/w/o: 33603.77/9601.08/4800.54) lat (ms,95%): 161.51 err/s: 0.00 reconn/s: 0.00
[ 1650s ] thds: 256 tps: 2457.72 qps: 48644.48 (r/w/o: 34138.12/9590.91/4915.44) lat (ms,95%): 277.21 err/s: 0.00 reconn/s: 0.00
[ 1651s ] thds: 256 tps: 2093.37 qps: 42377.42 (r/w/o: 29577.18/8613.51/4186.73) lat (ms,95%): 211.60 err/s: 0.00 reconn/s: 0.00
[ 1652s ] thds: 256 tps: 3789.99 qps: 75799.84 (r/w/o: 53059.89/15159.97/7579.98) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 1653s ] thds: 256 tps: 1814.24 qps: 35260.67 (r/w/o: 25399.37/6232.83/3628.48) lat (ms,95%): 95.81 err/s: 0.00 reconn/s: 0.00
[ 1654s ] thds: 256 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 1655s ] thds: 256 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 1656s ] thds: 256 tps: 542.07 qps: 11694.60 (r/w/o: 7502.03/3108.43/1084.15) lat (ms,95%): 3574.99 err/s: 0.00 reconn/s: 0.00
[ 1657s ] thds: 256 tps: 6486.97 qps: 128891.33 (r/w/o: 90904.53/25012.87/12973.93) lat (ms,95%): 62.19 err/s: 0.00 reconn/s: 0.00
[ 1658s ] thds: 256 tps: 8106.92 qps: 162524.31 (r/w/o: 113176.97/33134.50/16212.84) lat (ms,95%): 23.95 err/s: 0.00 reconn/s: 0.00
[ 1659s ] thds: 256 tps: 15238.55 qps: 304689.97 (r/w/o: 213349.67/60864.21/30476.10) lat (ms,95%): 27.66 err/s: 0.00 reconn/s: 0.00
[ 1660s ] thds: 256 tps: 12303.77 qps: 246054.32 (r/w/o: 172007.68/49441.12/24605.53) lat (ms,95%): 34.33 err/s: 0.00 reconn/s: 0.00
[ 1661s ] thds: 256 tps: 5526.06 qps: 111256.24 (r/w/o: 77919.87/22280.25/11056.12) lat (ms,95%): 58.92 err/s: 0.00 reconn/s: 0.00
[ 1662s ] thds: 256 tps: 7391.32 qps: 147826.32 (r/w/o: 103478.43/29565.26/14782.63) lat (ms,95%): 58.92 err/s: 0.00 reconn/s: 0.00
[ 1663s ] thds: 256 tps: 5768.34 qps: 115366.89 (r/w/o: 80756.82/23073.38/11536.69) lat (ms,95%): 87.56 err/s: 0.00 reconn/s: 0.00
[ 1664s ] thds: 256 tps: 4737.05 qps: 94740.94 (r/w/o: 66318.66/18948.19/9474.09) lat (ms,95%): 104.84 err/s: 0.00 reconn/s: 0.00
[ 1665s ] thds: 256 tps: 2615.67 qps: 51215.48 (r/w/o: 36280.38/9703.77/5231.33) lat (ms,95%): 314.45 err/s: 0.00 reconn/s: 0.00
[ 1666s ] thds: 256 tps: 66.01 qps: 1395.27 (r/w/o: 1263.24/0.00/132.03) lat (ms,95%): 64.47 err/s: 0.00 reconn/s: 0.00
[ 1667s ] thds: 256 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 1668s ] thds: 256 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 1669s ] thds: 256 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 1670s ] thds: 256 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 1671s ] thds: 256 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 1672s ] thds: 256 tps: 0.00 qps: 0.00 (r/w/o: 0.00/0.00/0.00) lat (ms,95%): 0.00 err/s: 0.00 reconn/s: 0.00
[ 1673s ] thds: 256 tps: 546.89 qps: 11034.84 (r/w/o: 7276.57/2672.48/1085.79) lat (ms,95%): 8038.61 err/s: 0.00 reconn/s: 0.00
[ 1674s ] thds: 256 tps: 3503.87 qps: 70007.45 (r/w/o: 49434.32/13557.38/7015.75) lat (ms,95%): 95.81 err/s: 0.00 reconn/s: 0.00
[ 1675s ] thds: 256 tps: 7072.70 qps: 141912.96 (r/w/o: 98717.89/29054.67/14140.41) lat (ms,95%): 62.19 err/s: 0.00 reconn/s: 0.00


对应的vmstat

procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
1  4      0    646      0 116295    0    0     0 336260 310125 422890 21  5 72  1  0
0  2      0    637      0 116301    0    0     0 184608 96937 184313  9  2 87  2  0
0  1      0    632      0 116308    0    0     0 137264 95155 186405  9  2 87  2  0
0  2      0    635      0 116310    0    0     0 116236 87614 143223  7  2 89  2  0
0  0      0    629      0 116315    0    0     0 109280 86632 156817  7  2 90  1  0
0  1      0    644      0 116299    0    0     0 119048 113159 186543  8  2 88  2  0
0  1      0    638      0 116302    0    0     0 127544 177194 172158  8  2 89  1  0
28  4      0    632      0 116311    0    0     0 197072 157379 295404 14  4 81  2  0
0  0      0    622      0 116317    0    0     0 310164 78217 144162  5  1 93  1  0
3  0      0    622      0 116317    0    0     0 986650 44976 68473  0  0 99  0  0
2  0      0    622      0 116317    0    0     0 2363072 97063 144921  0  1 98  1  0
82  1      0    620      0 116318    0    0     0 1084392 105080 177813  5  2 93  0  0
0  0      0    610      0 116334    0    0     0 1441272 248705 482744 19  5 76  1  0
64  0      0    635      0 116302    0    0     0 1662568 456515 772050 33  8 59  0  0
2  1      0    638      0 116300    0    0     0 1242168 595039 1102944 49 12 39  0  0
71  0      0    637      0 116293    0    0     0 723716 530131 944562 41 10 48  1  0
0  3      0    630      0 116307    0    0     0 530828 258759 411022 17  4 78  1  0
0  2      0    652      0 116285    0    0     0 445992 298652 549743 25  6 68  1  0
0  2      0    638      0 116297    0    0     0 308188 293469 412604 19  5 75  1  0
109  1      0    628      0 116310    0    0     0 294264 186431 354535 16  4 78  2  0
0  0      0    626      0 116314    0    0     0 135296 117599 200017  8  2 89  1  0
0  0      0    625      0 116316    0    0     0 133760 14493 23759  0  0 100  0  0
0  0      0    625      0 116316    0    0     0 118272 11512 19477  0  0 100  0  0
0  0      0    625      0 116316    0    0     0 132432 14123 22380  0  0 99  0  0
0  1      0    626      0 116316    0    0     0 171712 12824 21727  0  0 99  0  0
1  0      0    626      0 116316    0    0     0 243648 15805 25578  0  0 100  0  0
0  0      0    626      0 116316    0    0     0 371968 20882 33236  0  0 100  0  0
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
3  0      0    626      0 116316    0    0     0 1802788 75942 114170  0  1 99  0  0
0  3      0    625      0 116315    0    0     0 1320621 149007 210595  6  2 92  1  0
0  0      0    617      0 116325    0    0     0 1094200 142804 261062  9  2 89  0  0
157  0      0    640      0 116294    0    0     0 1408288 437553 656608 28  7 64  1  0
93  1      0    645      0 116288    0    0     0 1805892 681010 1287191 59 14 27  0  0
84  0      0    637      0 116303    0    0     0 1308009 415446 829033 35  8 56  0  0
51  2      0    624      0 116311    0    0     0 671988 483959 860748 37  9 53  1  0
4  2      0    646      0 116291    0    0     0 446984 334682 574670 26  7 66  1  0
0  3      0    633      0 116307    0    0     0 319940 221905 439048 20  5 74  1  0
1  0      0    625      0 116317    0    0     0 293552 135040 282226 12  3 84  1  0
0  0      0    625      0 116317    0    0     0 354432 21447 33738  0  0 99  0  0
0  0      0    629      0 116317    0    0     0 248960 21529 30548  0  0 99  0  0
0  3      0    627      0 116317    0    0     0 128141 12081 20019  0  0 100  0  0
0  0      0    627      0 116317    0    0     0 117312 11576 19301  0  0 99  1  0
0  0      0    627      0 116317    0    0     0 134528 12656 20669  0  0 99  0  0
0  0      0    627      0 116317    0    0     0 168192 14146 22258  0  0 100  0  0
0  0      0    628      0 116317    0    0     0 301696 21461 31785  0  0 99  0  0
1  0      0    628      0 116317    0    0     0 332548 20577 31028  0  0 100  0  0
0  0      0    628      0 116317    0    0     0 810752 39596 58447  0  0 99  0  0
0  0      0    661      0 116279    0    0     0 1946544 357126 457382 15  4 80  0  0
61  1      0    654      0 116285    0    0     0 1644160 224016 198789  4  2 94  0  0
150  0      0    623      0 116303    0    0     0 1253709 522911 939606 43 10 46  1  0
103  1      0    626      0 116301    0    0     0 1757648 689512 1217810 55 13 31  0  0
0  0      0    657      0 116276    0    0     0 1199308 366839 613488 26  6 67  0  0
0  6      0    646      0 116283    0    0     0 604904 273777 374281 15  4 80  1  0
23  0      0    633      0 116300    0    0     0 455016 292606 564914 26  6 66  1  0
133  1      0    652      0 116277    0    0     0 374860 311832 511319 23  6 70  1  0
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----







yejr 2024-4-24 15:39:41
mabai 发表于 2024-4-24 09:50
我把之前的数据量(100tables   200w/table)铲掉 重新然后重新导入了100张表 每张表500w 使用sysbench压 ...

压测给的压力太大了,你看 lat (ms,95%): 277.21,都277ms
这么大压力下,出现性能抖动,短时tps = 0也很正常

压测的目的分为几种
1. 适当加压,找到一个最佳性能负载模型,这种模型下,通常lat值保持在20以内
2. 疯狂加压,找到一个“搞死数据库”负载极值模型,这种就无所谓了

如果你想对比GreatSQL vs MySQL的性能表现,可以从以下几个方面来评估对比
1. tps稳定性(谁的抖动幅度更小,抖动次数更少)
2. 相同压力下,谁的lat值更低(响应更快)
3. 相同压力下,谁的tps更高
4. 相同压力下,谁的avg lat更小
其他等等。。。
mabai 2024-4-24 15:48:52
本帖最后由 mabai 于 2024-4-24 15:51 编辑

yejr 发表于 2024-4-24 15:39
压测给的压力太大了,你看 lat (ms,95%): 277.21,都277ms
这么大压力下,出现性能抖动,短时tps = 0也很 ...

https://greatsql.cn/thread-726-1-1.html


我重新开的一个帖子,重新搞的压测  从 thread 16开始的,还是会出现 抖动的情况,而且还是较为频繁
12

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-5-6 09:40 , Processed in 0.041668 second(s), 16 queries , Redis On.
快速回复 返回顶部 返回列表