TeslaCN commented on code in PR #18353:
URL: https://github.com/apache/shardingsphere/pull/18353#discussion_r896560582


##########
docs/document/content/reference/test/performance-test/sysbench-proxy-norules-test.cn.md:
##########
@@ -0,0 +1,139 @@
++++
+title = "Sysbench ShardingSphere Proxy 空 Rules 性能测试"
+weight = 1
++++
+
+## 测试目的
+
+对 ShardingSphere-Proxy 及 MySQL 进行性能对比
+1. sysbench 直接压测 MySQL 性能
+2. sysbench 压测 ShardingSphere-Proxy(底层透传 MySQL)
+
+基于以上两组实验,得到使用 ShardingSphere-Proxy 对于 MySQL 的损耗。
+
+## 测试环境搭建
+
+### 服务器信息
+
+1. DB 相关配置:推荐内存大于压测的数据量,使得数据均在内存热块中,其余可自行调整;
+2. ShardingSphere-Proxy 相关配置:推荐使用高性能多核 CPU,其余可自行调整;
+3. 压测涉及服务器均关闭 swap 分区。
+
+### 数据库
+
+```shell
+[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 ](https://github.com/akopytov/sysbench) 官网自行获取
+
+### ShardingSphere-Proxy
+
+#### bin/start.sh
+
+```shell
+ -Xmx16g -Xms16g -Xmn8g  # 调整 JVM 相关参数
+```
+
+#### config.yaml
+
+```yaml
+schemaName: sharding_db
+
+dataSources:
+  ds_0:
+    url: 
jdbc:mysql://***.***.***.***:****/test?serverTimezone=UTC&useSSL=false # 参数可适当调整
+    username: test
+    password: 
+    connectionTimeoutMilliseconds: 30000
+    idleTimeoutMilliseconds: 60000
+    maxLifetimeMilliseconds: 1800000
+    maxPoolSize: 200 # 最大链接池设为 ${压测并发数} 与压测并发数保持一致,屏蔽压测过程中额外的链接带来的影响
+    minPoolSize: 200 # 最小链接池设为 ${压测并发数} 与压测并发数保持一致,屏蔽压测过程中初始化链接带来的影响 
+
+rules: []
+
+```
+
+## 测试阶段
+
+### 环境准备
+
+```shell
+sysbench oltp_read_write --mysql-host='${DB_IP}' --mysql-port=${DB_PORT} 
--mysql-user=${USER} --mysql-password='${PASSWD}' --mysql-db=test --tables=10 
--table-size=1000000 --report-interval=10 --time=100 --threads=200  cleanup

Review Comment:
   Consider removing the single quote.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to