-
Notifications
You must be signed in to change notification settings - Fork 86
Description
Description
Upon restart, the agent sends numerous API calls to configure VPP (with a count of 2,100,140), but the process takes a significant amount of time to complete. I benchmarked the goVPP APIs using the perf-bench example, and the results indicate that the performance of the RPC, SYNC channel, and SYNC stream is inadequate and requires substantial improvement. These components should be capable of achieving a minimum rate of 30K operations per second.
How to reproduce
Steps to reproduce the behavior:
I used target rate of 2,100,140 to profile and benchmark the goVPP API. Below is the exact command line utilized for the benchmarking process.
sudo ./perf-bench --api-socket /run/vpp/api.sock --count=2100140 --rpc
sudo ./perf-bench --sync --api-socket /run/vpp/api.sock --count=2100140
sudo ./perf-bench --sync --api-socket /run/vpp/api.sock --count=2100140 --v2
sudo ./perf-bench --api-socket /run/vpp/api.sock --count=2100140
sudo ./perf-bench --api-socket /run/vpp/api.sock --count=2100140 --v2
Kindly use the following PR #253 to incorporate support for RPCs into the perf-bench example.
RPC
sudo ./perf-bench --api-socket /run/vpp/api.sock --count=2100140 --rpc
Running RPC perf test with 2100140 requests...
Test took: 2m38.333176979s
Requests per second: 13264
Channel
sudo ./perf-bench --sync --api-socket /run/vpp/api.sock --count=2100140
Running synchronous perf test with 2100140 requests...
Test took: 2m41.739194965s
Requests per second: 12985
Stream
sudo ./perf-bench --sync --api-socket /run/vpp/api.sock --count=2100140 --v2
Running synchronous perf test with 2100140 requests...
Test took: 1m46.650463371s
Requests per second: 19692
Channel Async (use another go routine)
sudo ./perf-bench --api-socket /run/vpp/api.sock --count=2100140
Running asynchronous perf test with 2100140 requests...
Sending asynchronous requests finished
Sending 2100140 Receiving 2100140
Test took: 23.745621161s
Requests per second: 88443
Stream Async (use another go routine)
sudo ./perf-bench --api-socket /run/vpp/api.sock --count=2100140 --v2
Running asynchronous perf test with 2100140 requests...
Sending asynchronous requests finished
Sending 2100140 Receiving 2100140
Test took: 32.591164196s
Requests per second: 64439
Environment
Info | Value |
---|---|
OS/arch | linux/x86_64 |
VPP version | master |
GoVPP version | master |
uname -r
5.15.0-107-generic
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
vpp# show cpu
Model name: Intel(R) Xeon(R) Gold 6146 CPU @ 3.20GHz
Microarch model (family): [0x6] Skylake ([0x55] Skylake X/SP) stepping 0x4
Flags: sse3 pclmulqdq ssse3 sse41 sse42 avx rdrand avx2 bmi2 rtm pqm pqe avx512f rdseed aes aperfmperf invariant_tsc
Base frequency: 3.20 GHz
vpp# sh version
vpp v25.02-rc0~210-ge210d413d built by sykazmi on vpp-220-6 at 2025-01-03T14:36:50
To compare the results with the C API bindings (shared memory for now):
Please fetch or pull the patch which adds support for benchmarking the C API bindings in VAT2: https://gerrit.fd.io/r/c/vpp/+/42105
Compile and run VPP.
C API Async performance:
sudo ./vpp/build-root/install-vpp-native/vpp/bin/vat2 --benchmark 2100000
Benchmarking 2100000 repeats
Elapsed time: 9.837724 seconds Reqs/s: 213464.01
C API Sync performance:
- Find the control_ping message:
sudo ./vpp/build-root/install-vpp-native/vpp/bin/vat2 --dump-apis | grep control_ping
control_ping
- Find the Json message format for control_ping:
sudo ./vpp/build-root/install-vpp-native/vpp/bin/vat2 -t control_ping
{
"_msgname": "control_ping",
"_crc": "51077d14"
}
- Create and execute the command:
sudo ./vpp/build-root/install-vpp-native/vpp/bin/vat2 --benchmark 210000 control_ping '{"_msgname": "control_ping","_crc": "51077d14"}'
Benchmarking 210000 repeats
Elapsed time: 5.342462 seconds Reqs/s: 39307.72