| <?xml version="1.0" encoding="utf-8" standalone="yes"?> |
| <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
| <channel> |
| <title>性能测试 on ShardingSphere</title> |
| <link>https://shardingsphere.apache.org/document/current/cn/test-manual/performance-test/</link> |
| <description>Recent content in 性能测试 on ShardingSphere</description> |
| <generator>Hugo -- gohugo.io</generator> |
| <language>en-us</language> |
| |
| <atom:link href="https://shardingsphere.apache.org/document/current/cn/test-manual/performance-test/index.xml" rel="self" type="application/rss+xml" /> |
| |
| |
| <item> |
| <title>Sysbench ShardingSphere Proxy 空 Rules 性能测试</title> |
| <link>https://shardingsphere.apache.org/document/current/cn/test-manual/performance-test/sysbench-proxy-norules-test/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/document/current/cn/test-manual/performance-test/sysbench-proxy-norules-test/</guid> |
| <description>测试目的 对 ShardingSphere-Proxy 及 MySQL 进行性能对比 |
| sysbench 直接压测 MySQL 性能 sysbench 压测 ShardingSphere-Proxy(底层透传 MySQL) 基于以上两组实验,得到使用 ShardingSphere-Proxy 对于 MySQL 的损耗。 |
| 测试环境搭建 服务器信息 DB 相关配置:推荐内存大于压测的数据量,使得数据均在内存热块中,其余可自行调整; ShardingSphere-Proxy 相关配置:推荐使用高性能多核 CPU,其余可自行调整; 压测涉及服务器均关闭 swap 分区。 数据库 [mysqld] innodb_buffer_pool_size=${MORE_THAN_DATA_SIZE} innodb-log-file-size=3000000000 innodb-log-files-in-group=5 innodb-flush-log-at-trx-commit=0 innodb-change-buffer-max-size=40 back_log=900 innodb_max_dirty_pages_pct=75 innodb_open_files=20480 innodb_buffer_pool_instances=8 innodb_page_cleaners=8 innodb_purge_threads=2 innodb_read_io_threads=8 innodb_write_io_threads=8 table_open_cache=102400 log_timestamps=system thread_cache_size=16384 transaction_isolation=READ-COMMITTED # 可参考进行适当调优,旨在放大底层 DB 性能,不让实验受制于 DB 性能瓶颈。 压测工具 可通过 sysbench 官网自行获取 |
| ShardingSphere-Proxy bin/start.sh -Xmx16g -Xms16g -Xmn8g # 调整 JVM 相关参数 config.</description> |
| </item> |
| |
| <item> |
| <title>BenchmarkSQL ShardingSphere Proxy 分片性能测试</title> |
| <link>https://shardingsphere.apache.org/document/current/cn/test-manual/performance-test/benchmarksql-proxy-sharding-test/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/document/current/cn/test-manual/performance-test/benchmarksql-proxy-sharding-test/</guid> |
| <description>测试目的 使用 BenchmarkSQL 工具测试 ShardingSphere Proxy 的分片性能。 |
| 测试方法 ShardingSphere Proxy 支持通过 BenchmarkSQL 5.0 进行 TPC-C 测试。 除本文说明的内容外,BenchmarkSQL 操作步骤按照原文档 HOW-TO-RUN.txt 即可。 |
| 测试工具微调 与单机数据库压测不同,分布式数据库解决方案难免在功能支持上有所取舍。使用 BenchmarkSQL 压测 ShardingSphere Proxy 建议进行如下调整。 |
| 移除外键与 extraHistID 修改 BenchmarkSQL 目录下 run/runDatabaseBuild.sh,文件第 17 行。 |
| 修改前: |
| AFTER_LOAD=&#34;indexCreates foreignKeys extraHistID buildFinish&#34; 修改后: |
| AFTER_LOAD=&#34;indexCreates buildFinish&#34; 压测环境或参数建议 注意:本节中提到的任何参数都不是绝对值,都需要根据实际测试结果进行调整或取舍。 |
| 建议使用 Java 17 运行 ShardingSphere 编译 ShardingSphere 可以使用 Java 8。 |
| 使用 Java 17 可以在默认情况下尽量提升 ShardingSphere 的性能。 |
| ShardingSphere 数据分片建议 对 BenchmarkSQL 的数据分片,可以考虑以各个表中的 warehouse id 作为分片键。 |
| 其中一个表 bmsql_item 没有 warehouse id,数据量固定 10 万行:</description> |
| </item> |
| |
| </channel> |
| </rss> |