Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Testing #14

Closed
markmandel opened this issue Jan 28, 2020 · 9 comments
Closed

Performance Testing #14

markmandel opened this issue Jan 28, 2020 · 9 comments
Labels
area/build-tools Development tooling. area/tests Unit tests, integration tests, anything to make sure things don't break good first issue Good for newcomers help wanted Extra attention is needed priority/high Issues that should be addressed as soon as possible.

Comments

@markmandel
Copy link
Member

We should have some kind of repeatable performance harness, ideally running on a regular basis, so we can see if have performance problems or regressions.

@markmandel markmandel added area/tests Unit tests, integration tests, anything to make sure things don't break area/build-tools Development tooling. labels Jan 28, 2020
@markmandel markmandel added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 29, 2020
@markmandel
Copy link
Member Author

Suggestion: Stick it in front of a game and see what happens.

Could use Xonotic or Supertuxkart from Agones as an example (in fact, could be an interesting example to have on hand anyway).

@markmandel
Copy link
Member Author

Working on an example with https://iperf.fr/iperf-doc.php#3doc to demo sending lots of packets through - this can be then turned into a proper perf test.

@markmandel
Copy link
Member Author

About to submit a PR, so that everyone can replicate locally, but wanted to capture this.

When running iperf3 against itself on my local machine (no quilkin proxy), I get this result:

[SUM]   0.00-60.00  sec  2.10 GBytes   300 Mbits/sec  0.000 ms  0/68700 (0%)  sender
[SUM]   0.00-60.00  sec  2.10 GBytes   300 Mbits/sec  0.009 ms  0/68700 (0%)  receiver

Very little jitter, and nothing dropped.

Unfortunately, when I do the same test with Quilkin in between I see the the following:

[SUM]   0.00-60.00  sec  2.10 GBytes   300 Mbits/sec  0.000 ms  0/68700 (0%)  sender
[SUM]   0.00-60.00  sec  1.40 GBytes   200 Mbits/sec  0.288 ms  22635/68521 (33%)  receiver

As you can see, quite a bit of packet loss and some pretty nasty jitter. I've run this a few times and seen similar results.

I'm not 100% sure it's Quilkin just because I had to do some TCP tunnelling to get iperf3 to work with Quilkin between, and I'm assuming I got it all correct, but worth noting.

I capture Quilkin's prometheus metrics, along with all the logs, and they list no packets dropped, or errors. iperf3.zip

@iffyio when you did you load tests, did you get reports back on packets dropped?

The good new is - CPU is low for the number of packets I'm sending, and memory is very stable.

markmandel added a commit that referenced this issue Apr 21, 2021
markmandel added a commit that referenced this issue Apr 21, 2021
@iffyio
Copy link
Collaborator

iffyio commented Apr 21, 2021

Packet loss would be expected if quilkin isn't keeping up with what iperf3 is sending - its recv buffer gets full and the os drops any new packets, which would be fine. As long as quilkin is forwarding all packets it receives which sounds like thats the case. In my previous tests I didn't explicitly check for packet loss but I was pretty sure some where being dropped since the sender there sent as fast as was possible

@markmandel
Copy link
Member Author

Another idea benchmarking: https://www.jibbow.com/posts/criterion-flamegraphs/

In general https://github.com/tikv/pprof-rs looks pretty awesome for looking into things. Shame it doesn't do heap analysis as well.

@markmandel
Copy link
Member Author

Packet loss would be expected if quilkin isn't keeping up with what iperf3 is sending

🤔 CPU is definitely not a bottleneck here. But the point of setting this up is so we can dig into these type of issues. We can keep building out tooling and see where we end up.

I'll adjust the PR to be something that passes a bit better, rather than an overload, and we can take things from there.

@markmandel
Copy link
Member Author

Dropping the parallelism to 75 (on my laptop at least) means that packets don't drop -- so it does seem like an overwhelming of the system issue.

I am also realising that i am not smart, and I'm reading this jitter results badly. I read 0.288 ms as 200ms, not 0.2ms - so it's not actually that bad at all. 🤦🏻 Please excuse my panic.

markmandel added a commit that referenced this issue Apr 22, 2021
* iperf3 performance testing example

Work on #14

* Extra tweaks.

* Review update: trap exit and cleanup.
@XAMPPRocky XAMPPRocky added the priority/medium Issues that we want to resolve, but don't require immediate resolution. label Jul 5, 2021
@XAMPPRocky XAMPPRocky added this to Medium Priority in Priority Board Jul 5, 2021
@XAMPPRocky XAMPPRocky moved this from Medium Priority to High priority in Priority Board Jul 7, 2021
@XAMPPRocky XAMPPRocky added priority/high Issues that should be addressed as soon as possible. and removed priority/medium Issues that we want to resolve, but don't require immediate resolution. labels Jul 7, 2021
@XAMPPRocky XAMPPRocky added this to the Release milestone Jul 7, 2021
@XAMPPRocky
Copy link
Collaborator

Moving this to high priority because I'd to have to a criterion benchmark in the repository before release.

@markmandel markmandel removed this from the Release milestone Jul 28, 2021
@XAMPPRocky
Copy link
Collaborator

Going to close this, as we now have a couple of benchmarks, and we can track any of them in newer more specific issues.

Priority Board automation moved this from High priority to Closed Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. area/tests Unit tests, integration tests, anything to make sure things don't break good first issue Good for newcomers help wanted Extra attention is needed priority/high Issues that should be addressed as soon as possible.
Projects
Development

No branches or pull requests

3 participants