containernetworking / plugins

Some reference and example networking plugins, maintained by the CNI team.
Apache License 2.0
2.17k stars 778 forks source link

publish a reproducible test that defines how to eval. bandwidth plugin locally #827

Open jayunit100 opened 1 year ago

jayunit100 commented 1 year ago

We have some issues like https://github.com/containernetworking/plugins/issues/609 , where folks have documented the spikey behaviour of the bandwidth plugin.

Tabulating that into a graph, you get something like this:

image

A small program

Lets reference some kind of reproducible, easily understandable test for this - one idea is a small go program (bandwidth_measure.go) which can run in two modes:

Then we can just test bandwidth inside the cluster in a predictable way without any external deps

A more realistic benchmark like EC2 or JMeter

It seems like most people hit the BW plugin in situations where the outside resource has infinite bandwidth but they dont wanna use too much internal bandwidth. So something like picking an EC2 file and just pulling it down a bunch of times could be a easy reproducible test.

If we want we can do JMeter instead if we dont wanna rely on someone elses file storage. But JMeter would require us running a JMeter pod.

Just use the e2e.test library

We do have k8s e2e tests. I dont know if we have one that excersizes bandwidth though. maybe we could write such a test... ?

dcbw commented 1 year ago

The unit tests create a network namespace and run a live test with bandwidth limiting inside that namespace. I think it would be definitely a good idea to get measurements of the behavior during that test, and potentially fail it if the behavior isn't what we expect. But at least get that data so we know how things behavior more reliably.

jayunit100 commented 1 year ago

/reopen

I think we'd still.like to do this

jayunit100 commented 1 year ago

hmmm. how do i reopen this?

jayunit100 commented 1 year ago

I dont have time to work on this anymore , does anyone else want to take it up? Im working on some different things nowadays.