You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "luky116 (via GitHub)" <gi...@apache.org> on 2024/11/14 14:37:42 UTC
[I] [getty] seata-go 网络吞吐压测 [incubator-seata-go]
luky116 opened a new issue, #693:
URL: https://github.com/apache/incubator-seata-go/issues/693
<!-- Please only use this template for submitting enhancement requests -->
**What would you like to be added**:
**Why is this needed**:
--
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: notifications-unsubscribe@seata.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [I] [getty] seata-go 网络吞吐压测 [incubator-seata-go]
Posted by "beatenevo (via GitHub) via notifications" <no...@seata.apache.org>.
beatenevo commented on issue #693:
URL: https://github.com/apache/incubator-seata-go/issues/693#issuecomment-6599417400
plz assign it for me.
--
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: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [I] [getty] seata-go 网络吞吐压测 [incubator-seata-go]
Posted by "Ethan-Xingyue (via GitHub)" <gi...@apache.org>.
Ethan-Xingyue commented on issue #693:
URL: https://github.com/apache/incubator-seata-go/issues/693#issuecomment-5757351119
Consolidating the benchmark-related issues here so there is a single tracking point:
- **#249 (TCC benchmark)** is merged into this issue. There is still no committed TCC benchmark in the repository (no `Benchmark*` functions under `pkg/rm/tcc`); the numbers posted above are the only data so far. The benchmark harness itself should be committed so the results are reproducible.
- **#750 (publish the benchmark article on the website)** is merged into this issue. Note that the PR it referenced (#686) is the linter-configuration change, not a benchmark article, and the website currently has no seata-go benchmark post. Publishing the results is the final deliverable of this issue once the numbers are stable.
--
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: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [I] [getty] seata-go 网络吞吐压测 [incubator-seata-go]
Posted by "No-SilverBullet (via GitHub)" <gi...@apache.org>.
No-SilverBullet commented on issue #693:
URL: https://github.com/apache/incubator-seata-go/issues/693#issuecomment-2505396123
Network throughput testing is not easy to do. First, i did a benchmark test on tcc. After improving the use of getty, we can make a comparison.
### TCC Benchmark
seata-server definition
```yml
version: '3'
services:
seata-server:
image: seataio/seata-server:latest
ports:
- "8091:8091"
- "7091:7091"
environment:
- SEATA_PORT=8091
- STORE_MODE=file
deploy:
resources:
limits:
cpus: '0.5' # 限制 CPU 使用量为 50%
memory: 512M # 限制最多使用 512MB 内存
```
add local_test.go in tcc/local/cmd
```go
package main
import (
"context"
"os"
"testing"
"github.com/seata/seata-go/pkg/client"
"github.com/seata/seata-go/pkg/tm"
)
func TestMain(m *testing.M) {
client.InitPath("../../../conf/seatago.yml")
os.Exit(m.Run())
}
func BenchmarkTCC(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
tm.WithGlobalTx(context.Background(), &tm.GtxConfig{
Name: "TccSampleLocalGlobalTx",
}, business)
}
}
```
**1.default 1s**
```sh
>go test -bench=.
22 68491922 ns/op 112584 B/op 2456 allocs/op
```
**2.test 5s**
```sh
>go test -bench=. -benchtime=5s
105 91596222 ns/op 113655 B/op 2465 allocs/op
```
**3.test 10s**
```sh
>go test -bench=. -benchtime=10s
511 21843102 ns/op 113065 B/op 2461 allocs/op
```
**4.test 30s**
```sh
>go test -bench=. -benchtime=30s
1024 41268242 ns/op 113209 B/op 2462 allocs/op
```
**4.do 1000 times**
Total cost 31s
**5.do 5000 times**
Total cost 166s
**6.do 10000 times**
seata-server OOM
```sh
~ ❯ docker inspect <seata-server-id> --format='{{json .State}}'
{"Status":"exited","Running":false,"Paused":false,"Restarting":false,"OOMKilled":true,"Dead":false,"Pid":0,"ExitCode":137,"Error":"","StartedAt":"2024-11-27T02:51:29.070297501Z","FinishedAt":"2024-11-27T02:54:38.698686464Z"}
```
raise the memory allocation to 1G and restart seata-server
```yml
version: '3'
services:
seata-server:
image: seataio/seata-server:latest
ports:
- "8091:8091"
- "7091:7091"
environment:
- SEATA_PORT=8091
- STORE_MODE=file
deploy:
resources:
limits:
cpus: '0.5' # 限制 CPU 使用量为 50%
memory: 1g # 限制最多使用 512MB 内存
```
Total cost is 281.761s
--
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: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org