Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PERFORMANCE_TEST.md, refine and fix description #301

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions producer/PERFORMANCE_TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ content_key_8: 8abcdefghijklmnopqrstuvwxyz!@#$%^&*()_0123456789-<suffix>
### Project & Logstore

- Project:在 ECS 所在 region 创建目标 project 并通过 VPC 网络服务入口进行访问。
- Logstore:在该 project 下创建一个分区数为 10 的 logstore(未开启索引),该 logstore 的写入流量最大为 50 MB/s,参阅[数据读写](https://help.aliyun.com/document_detail/92571.html)。
- Logstore:在该 project 下创建一个分区数为 10 的 logstore(未开启索引),该 logstore 的写入流量最大为 10 * 10 = 100 MB/s,参阅[数据读写](https://help.aliyun.com/document_detail/92571.html)。
> 注:100 MB/s 的写入流量值非硬性限制。超过限制时,系统会尽可能提供服务,但不保证服务质量。所以下方测试中提升配置的参数,能看到超过 100 MB/s的写入流量

## 测试用例

Expand All @@ -54,8 +55,8 @@ content_key_8: 8abcdefghijklmnopqrstuvwxyz!@#$%^&*()_0123456789-<suffix>
| cpu数量 | 线程池groutine数量 | 原始数据吞吐量 | 压缩后数据吞吐量 | cpu使用率 | 说明 |
| ------- | ------------------ | -------------- | ---------------- | --------- | --------------------------- |
| 1 | 50 | 73.386MB/s | 7.099MB/s | 24% | 未达到10个shard写入能力上限 |
| 2 | 50 | 136.533MB/s | 13.141MB/s | 50% | 未达到10个shard写入能力上限 |
| 4 | 50 | 163.84MB/s | 15.701MB/s | 84% | 未达到10个shard写入能力上限 |
| 2 | 50 | 136.533MB/s | 13.141MB/s | 50% | 能够达到10个shard写入能力上限|
| 4 | 50 | 163.84MB/s | 15.701MB/s | 84% | 能够达到10个shard写入能力上限|



Expand All @@ -66,8 +67,8 @@ content_key_8: 8abcdefghijklmnopqrstuvwxyz!@#$%^&*()_0123456789-<suffix>
| cpu数量 | 线程池groutine数量 | 原始数据吞吐量 | 压缩后数据吞吐量 | cpu使用率 | 说明 |
| ------- | ------------------ | -------------- | ---------------- | --------- | --------------------------- |
| 1 | 100 | 69.97MB/s | 6.656MB/s | 23% | 未达到10个shard写入能力上限 |
| 2 | 100 | 131.41MB/s | 12.62MB/s | 49% | 未达到10个shard写入能力上限 |
| 4 | 100 | 162.133MB/s | 15.701MB/s | 84% | 未达到10个shard写入能力上限 |
| 2 | 100 | 131.41MB/s | 12.62MB/s | 49% | 能够达到10个shard写入能力上限 |
| 4 | 100 | 162.133MB/s | 15.701MB/s | 84% | 能够达到10个shard写入能力上限 |

## 调整totalSizeInBytes

Expand All @@ -76,11 +77,11 @@ content_key_8: 8abcdefghijklmnopqrstuvwxyz!@#$%^&*()_0123456789-<suffix>
| TotalSizeInBytes | 线程池groutine数量 | 原始数据吞吐量 | 压缩后数据吞吐量 | cpu使用率 | 说明 |
| ---------------- | ------------------ | -------------- | ---------------- | --------- | --------------------------- |
| 52,428,800 | 50 | 34.133MB/s | 3.3792MB/s | 15% | 未达到10个shard写入能力上限 |
| 209,715,200 | 50 | 136.53MB/s | 13.141MB/s | 49% | 未达到10个shard写入能力上限 |
| 419,430,400 | 50 | 133.12MB/s | 12.8MB/s | 50% | 未达到10个shard写入能力上限 |
| 209,715,200 | 50 | 136.53MB/s | 13.141MB/s | 49% | 能够达到10个shard写入能力上限 |
| 419,430,400 | 50 | 133.12MB/s | 12.8MB/s | 50% | 能够达到10个shard写入能力上限 |

## 总结

1. 增加程序使用cpu数目可以显著提高吞吐量。
2. 在使用cpu数目不变的情况下,增加线程池groutine的数量并不一定会带来性能的提升,相反多开的groutine会提高程序gc的cpu使用率,所以线程池开启groutine的数量应该按照机器的性能去调整一个合适的数值,建议可以使用默认值。
3. 在cpu数目和线程池groutine数目不变的情况下,调整 totalSizeInBytes 对吞吐量影响不够显著,增加 totalSizeInBytes 会造成更多的 CPU 消耗,建议使用默认值。
3. 在cpu数目和线程池groutine数目不变的情况下,需保证 TotalSizeInBytes 数量不要过小而触发等待逻辑导致降低吞吐,建议使用默认值。
Loading