Skip to content

Commit

Permalink
perf: set send size only for UDP_STREAM test
Browse files Browse the repository at this point in the history
Previously, we were also setting it for TCP_STREAM, which is
significantly lowering throughput. This was different from all other
tests that were being performed in the past, for example in
cilium/cilium-perf-networking

Signed-off-by: Marcel Zieba <marcel.zieba@isovalent.com>
  • Loading branch information
marseel committed Aug 12, 2024
1 parent 254a7b4 commit b348e00
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions connectivity/perf/benchmarks/netperf/perfpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ func (s *netPerf) Run(ctx context.Context, t *check.Test) {
}
}

func buildExecCommand(test string, sip string, duration time.Duration, msgSize int, args []string) []string {
exec := []string{"/usr/local/bin/netperf", "-H", sip, "-l", duration.String(), "-t", test, "--", "-R", "1", "-m", fmt.Sprintf("%d", msgSize)}
func buildExecCommand(test string, sip string, duration time.Duration, args []string) []string {
exec := []string{"/usr/local/bin/netperf", "-H", sip, "-l", duration.String(), "-t", test, "--", "-R", "1"}
exec = append(exec, args...)

return exec
Expand All @@ -134,7 +134,10 @@ func parseFloat(a *check.Action, value string) float64 {

func netperf(ctx context.Context, sip string, perfTest common.PerfTests, a *check.Action) common.PerfResult {
args := []string{"-o", "MIN_LATENCY,MEAN_LATENCY,MAX_LATENCY,P50_LATENCY,P90_LATENCY,P99_LATENCY,TRANSACTION_RATE,THROUGHPUT,THROUGHPUT_UNITS"}
exec := buildExecCommand(perfTest.Test, sip, perfTest.Duration, perfTest.MsgSize, args)
if perfTest.Test == "UDP_STREAM" {
args = append(args, "-m", fmt.Sprintf("%d", perfTest.MsgSize))
}
exec := buildExecCommand(perfTest.Test, sip, perfTest.Duration, args)

a.ExecInPod(ctx, exec)
output := a.CmdOutput()
Expand Down

0 comments on commit b348e00

Please sign in to comment.