Skip to content

Conversation

@3062
Copy link
Contributor

@3062 3062 commented Nov 9, 2022

Issues associated with this PR

Your PR should present related issues you want to solve.

Solutions

You should show your solutions about the issues in your PR, including the overall solutions, details and the changes. At this time, Chinese is allowed to describe these.

UT result

Unit Test is needed if the code is changed, your unit test should cover boundary cases, corner cases, and some exceptional cases. And you need to show the UT result.

Benchmark

docker run --rm -v /Users/likun/mosn:/go/src/mosn.io/mosn -w /go/src/mosn.io/mosn mosnio/performance:v1 bash test/benchmark/benchmark-shell.sh build/bundles/v1.2.0/binary/mosn
Java HotSpot(TM) 64-Bit Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: CMSFullGCsBeforeCompaction is deprecated and will likely be removed in a future release.
2022-11-10 06:40:23,78 [INFO] register a new handler maker, name is default, is default: true
2022-11-10 06:40:23,137 [INFO] [admin server] [register api] register a new api /server_info
2022-11-10 06:40:23,137 [INFO] [admin server] [register api] register a new api /config_dump
2022-11-10 06:40:23,139 [INFO] [config] processor added to configParsedCBMaps
2022-11-10 06:40:23,160 [INFO] [network] [ register pool factory] register protocol: Http1 factory
2022-11-10 06:40:23,160 [INFO] [network] [ register pool factory] register protocol: Http2 factory
2022-11-10 06:40:23,212 [INFO] [mosn start] create an empty mosn structure
2022-11-10 06:40:23,212 [INFO] [stagemanager] state changed to 1
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: bolt factory
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: boltv2 factory
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: dubbo factory
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: dubbo-thrift factory
2022-11-10 06:40:23,212 [INFO] [network] [ register pool factory] register protocol: tars factory
2022-11-10 06:40:23,212 [INFO] load config from : test/benchmark/mosn_benchmark.json
2022-11-10 06:40:23,216 [INFO] parameters parsed stage cost: 4.065493ms
2022-11-10 06:40:23,217 [INFO] [stagemanager] state changed to 2
2022-11-10 06:40:23,217 [INFO] [mosn] [start] xds service type is not router/sidecar, use config only
2022-11-10 06:40:23,219 [INFO] [admin store] [add service] add server pprof
2022-11-10 06:40:23,225 [INFO] [mosn] [init tracing] disable tracing
2022-11-10 06:40:23,228 [INFO] [server] [reconfigure] not reconfigure: dial unix /go/src/mosn.io/mosn/test/benchmark/reconfig.sock: connect: connection refused
2022-11-10 06:40:23,228 [INFO] [mosn] [NewMosn] new mosn created
2022-11-10 06:40:23,229 [INFO] [mosn start] init the members of the mosn
2022-11-10 06:40:23,229 [INFO] [mosn start] mosn init cluster structures
2022-11-10 06:40:23,229 [INFO] [config] [parse cluster] max_request_per_conn is not specified, use default value 1024
2022-11-10 06:40:23,229 [INFO] [config] [parse cluster] conn_buffer_limit_bytes is not specified, use default value 16384
2022-11-10 06:40:23,230 [INFO] [cluster] [primaryCluster] [UpdateHosts] cluster test_cpp update hosts: 0
2022-11-10 06:40:23,230 [INFO] [cluster] [cluster manager] [AddOrUpdatePrimaryCluster] cluster test_cpp updated
2022-11-10 06:40:23,231 [INFO] [upstream] [host set] update host, final host total: 5
2022-11-10 06:40:23,231 [INFO] [cluster] [primaryCluster] [UpdateHosts] cluster test_cpp update hosts: 5
2022-11-10 06:40:23,231 [INFO] [mosn start] mosn init server structures
2022-11-10 06:40:23,229 [INFO] [admin store] [start service] start service pprof on [::]:34902
2022-11-10 06:40:23,238 [INFO] init stage cost: 21.215233ms
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn start xds client
2022-11-10 06:40:23,238 [ERROR] start xds failed: null point exception
2022-11-10 06:40:23,238 [WARN] [feature gate] feature MultiTenantMode is not enabled
2022-11-10 06:40:23,238 [WARN] [feature gate] feature auto_config is not enabled
2022-11-10 06:40:23,238 [WARN] [feature gate] feature XdsMtlsEnable is not enabled
2022-11-10 06:40:23,238 [WARN] [feature gate] feature PayLoadLimitEnable is not enabled
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn parse extend config
2022-11-10 06:40:23,238 [INFO] prepare start stage cost: 48.863µs
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn start server
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn transfer connections
2022-11-10 06:40:23,238 [INFO] [mosn start] mosn clean upgrade datas
2022-11-10 06:40:23,238 [INFO] start stage cost: 8.715µs
2022-11-10 06:40:23,238 [INFO] after start stage cost: 305ns
-t: warning: the number of threads is greater than hardware cores.
starting benchmark...
Application protocol: sofarpc

finished in 10.00s, 1997.50 req/s, 2.41MB/s
requests: 20000 total, 19980 started, 19975 done, 19975 succeeded, 0 failed, 0 errored, 0 timeout
sofaRPC status codes:
19975 success, 0 error, 0 server exception, 0 unknown
0 server threadpool busy, 0 error comm, 0 no processor, 0 timeout
0 client send error, 0 codec exception, 0 connection closed, 0 server serial exception
0 server deserial exception
traffic: 24.08MB (25248400) total, 390.14KB (399500) headers (space savings 0.00%), 23.70MB (24848900) data
min max mean sd +/- sd
time for request: 222us 350.19ms 6.63ms 28.43ms 95.26%
time for connect: 3us 92us 18us 13us 91.50%
req/s : 9.40 10.70 9.99 0.42 68.50%

Latency Distribution
50% 1.01ms
75% 1.50ms
90% 2.31ms
95% 30.63ms
99% 177.20ms

Code Style

  • Make sure Goimports has run
  • Show Golint result

@codecov
Copy link

codecov bot commented Nov 9, 2022

Codecov Report

Base: 60.34% // Head: 60.31% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (eefc27c) compared to base (8e0122a).
Patch coverage: 71.42% of modified lines in pull request are covered.

❗ Current head eefc27c differs from pull request most recent head f3d0571. Consider uploading reports for the commit f3d0571 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2173      +/-   ##
==========================================
- Coverage   60.34%   60.31%   -0.03%     
==========================================
  Files         417      420       +3     
  Lines       36585    36926     +341     
==========================================
+ Hits        22078    22273     +195     
- Misses      12324    12443     +119     
- Partials     2183     2210      +27     
Impacted Files Coverage Δ
pkg/stream/xprotocol/connpool_binding.go 55.61% <0.00%> (-0.32%) ⬇️
pkg/wasm/abi/proxywasm010/factory.go 50.00% <0.00%> (-2.64%) ⬇️
pkg/wasm/abi/proxywasm020/factory.go 50.00% <0.00%> (-2.64%) ⬇️
istio/istio1106/xds/conv/convert_listener.go 63.28% <100.00%> (+1.48%) ⬆️
pkg/module/http2/frame.go 84.17% <0.00%> (-0.31%) ⬇️
pkg/module/http2/transport.go 78.91% <0.00%> (ø)
pkg/filter/stream/proxywasm/adapter.go 31.41% <0.00%> (ø)
pkg/filter/stream/proxywasm/factory.go 66.66% <0.00%> (ø)
pkg/filter/stream/proxywasm/configs.go 40.42% <0.00%> (ø)
pkg/filter/stream/proxywasm/filter.go 73.14% <0.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@taoyuanyuan
Copy link
Contributor

运行过程和结果贴出来

@3062 3062 changed the title test: add performance test: add benchmark Nov 10, 2022
@taoyuanyuan taoyuanyuan requested a review from nejisama November 10, 2022 07:54
Copy link
Contributor

@antJack antJack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@taoyuanyuan taoyuanyuan reopened this Nov 10, 2022
@taoyuanyuan taoyuanyuan reopened this Nov 24, 2022
@taoyuanyuan taoyuanyuan merged commit b09f8cf into mosn:master Nov 24, 2022
@nejisama nejisama mentioned this pull request Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants