概述
DRDS 提供了更多系列、更大规格节点的实例,以满足越来越多样的在线数据操作需求。本文针对新老规格进行对比说明,同时详细介绍新规格各个系列差异,以及各规格单表 1.6 亿数据 Sysbench 标准混合操作场景下性能测试对比。
具体计费标准请参考
分布式关系型数据库服务规格和定价。
新老规格对比
新规格节点选择更多样新规格提供 4Core8G、8Core16G、16Core32G、32Core64G 节点组合的实例配置;- 更大的节点规格带来稳定性的大幅度提升;
- 升配不仅能够满足 SQL 流量增长的需求,也能够加速单条 SQL 执行效率;
- 节点规格加大,相同 DRDS 实例规格下节点变少,底层 RDS 连接更加集中,从而执行效率得到提升。
新规格价格优势明显
- 相同配置价格大幅度下降;
- 提供更细颗粒度的价格选择,每一个系列可以逐个添加节点,让升配更加经济。
升配更加灵活不同系列之间可以升配,让 SQL 适应性更好;- 老规格可以升配到新规格。
新规格各个系列差异
性能差异Sysbench 标准测试场景(混合 SQL);- 2 个 16Core64G RDS for MySQL;
- 1.6 亿数据,一张逻辑表,总共 16 个分库 64 张分表,平均一个分表 250 万数据,数据按照字段定义填充满;
- DRDS CPU 整体利用率在 80% 左右;
- 拆分字段 id,取值 1 ~ 160000000;
- 范围查询 id 取值范围 1 ~ 160000000,连续取值 5 个,必定走到 5 个分片,涉及 1250 万数据。
- [backcolor=transparent]"SELECT c FROM "[backcolor=transparent]..[backcolor=transparent] table_name [backcolor=transparent]..[backcolor=transparent]" WHERE id="[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] sb_rand[backcolor=transparent]([backcolor=transparent]1[backcolor=transparent],[backcolor=transparent] oltp_table_size[backcolor=transparent])
- [backcolor=transparent]"SELECT c FROM "[backcolor=transparent]..[backcolor=transparent] table_name [backcolor=transparent]..[backcolor=transparent]" WHERE id BETWEEN "[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] range_start [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]" AND "[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] range_start [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]"+"[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] oltp_range_size [backcolor=transparent]-[backcolor=transparent] [backcolor=transparent]1[backcolor=transparent])
- [backcolor=transparent]"SELECT c FROM "[backcolor=transparent]..[backcolor=transparent] table_name [backcolor=transparent]..[backcolor=transparent]" WHERE id BETWEEN "[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] range_start [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]" AND "[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] range_start [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]"+"[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] oltp_range_size [backcolor=transparent]-[backcolor=transparent] [backcolor=transparent]1[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]" ORDER BY c
- [backcolor=transparent]"[backcolor=transparent]SELECT DISTINCT c FROM [backcolor=transparent]".. table_name .."[backcolor=transparent] WHERE id BETWEEN [backcolor=transparent]" .. range_start .. "[backcolor=transparent] AND [backcolor=transparent]" .. range_start .. "[backcolor=transparent]+[backcolor=transparent]" .. oltp_range_size - 1 .. "[backcolor=transparent] ORDER BY c
- [backcolor=transparent]"UPDATE "[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] table_name [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]" SET k=k+1 WHERE id="[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] sb_rand[backcolor=transparent]([backcolor=transparent]1[backcolor=transparent],[backcolor=transparent] oltp_table_size[backcolor=transparent])
- [backcolor=transparent]"UPDATE "[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] table_name [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]" SET c='"[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] c_val [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]"' WHERE id="[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] sb_rand[backcolor=transparent]([backcolor=transparent]1[backcolor=transparent],[backcolor=transparent] oltp_table_size[backcolor=transparent])
- [backcolor=transparent]"DELETE FROM "[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] table_name [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]" WHERE id="[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] i
- [backcolor=transparent]"INSERT INTO "[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] table_name [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]" (id, k, c, pad) VALUES "[backcolor=transparent] [backcolor=transparent]..[backcolor=transparent] [backcolor=transparent]string[backcolor=transparent].[backcolor=transparent]format[backcolor=transparent]([backcolor=transparent]"(%d, %d, '%s', '%s')"[backcolor=transparent],[backcolor=transparent]i[backcolor=transparent],[backcolor=transparent] sb_rand[backcolor=transparent]([backcolor=transparent]1[backcolor=transparent],[backcolor=transparent] oltp_table_size[backcolor=transparent])[backcolor=transparent] [backcolor=transparent],[backcolor=transparent] c_val[backcolor=transparent],[backcolor=transparent] pad_val[backcolor=transparent])
- [backcolor=transparent]--[backcolor=transparent] oltp_table_size[backcolor=transparent]=[backcolor=transparent]160000000
- [backcolor=transparent]--[backcolor=transparent] oltp_range_size[backcolor=transparent]=[backcolor=transparent]5
- [backcolor=transparent] CREATE TABLE [backcolor=transparent]`sbtest1`[backcolor=transparent] [backcolor=transparent](
- [backcolor=transparent] [backcolor=transparent]`id`[backcolor=transparent] [backcolor=transparent]int[backcolor=transparent]([backcolor=transparent]10[backcolor=transparent])[backcolor=transparent] [backcolor=transparent]unsigned[backcolor=transparent] NOT NULL[backcolor=transparent],
- [backcolor=transparent] [backcolor=transparent]`k`[backcolor=transparent] [backcolor=transparent]int[backcolor=transparent]([backcolor=transparent]10[backcolor=transparent])[backcolor=transparent] [backcolor=transparent]unsigned[backcolor=transparent] NOT NULL DEFAULT [backcolor=transparent]'0'[backcolor=transparent],
- [backcolor=transparent] [backcolor=transparent]`c`[backcolor=transparent] [backcolor=transparent]char[backcolor=transparent]([backcolor=transparent]120[backcolor=transparent])[backcolor=transparent] NOT NULL DEFAULT [backcolor=transparent]''[backcolor=transparent],
- [backcolor=transparent] [backcolor=transparent]`pad`[backcolor=transparent] [backcolor=transparent]char[backcolor=transparent]([backcolor=transparent]60[backcolor=transparent])[backcolor=transparent] NOT NULL DEFAULT [backcolor=transparent]''[backcolor=transparent],
- [backcolor=transparent] KEY [backcolor=transparent]`auto_shard_key_id`[backcolor=transparent] [backcolor=transparent]([backcolor=transparent]`id`[backcolor=transparent]),
- [backcolor=transparent] KEY [backcolor=transparent]`k_1`[backcolor=transparent] [backcolor=transparent]([backcolor=transparent]`k`[backcolor=transparent])
- [backcolor=transparent])[backcolor=transparent] ENGINE[backcolor=transparent]=[backcolor=transparent]InnoDB[backcolor=transparent] DEFAULT CHARSET[backcolor=transparent]=[backcolor=transparent]utf8 MAX_ROWS[backcolor=transparent]=[backcolor=transparent]1000000[backcolor=transparent] dbpartition [backcolor=transparent]by[backcolor=transparent] hash[backcolor=transparent]([backcolor=transparent]`id`[backcolor=transparent])[backcolor=transparent] tbpartition [backcolor=transparent]by[backcolor=transparent] hash[backcolor=transparent]([backcolor=transparent]`id`[backcolor=transparent])[backcolor=transparent] tbpartitions [backcolor=transparent]4
[tr=rgb(239, 251, 255)][td]
| | | | 企业版 32Core64G |
read/write requests | | | | | 54344 |