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

Updating the media-streaming benchmark #359

Merged
merged 22 commits into from
Sep 20, 2022
Merged

Updating the media-streaming benchmark #359

merged 22 commits into from
Sep 20, 2022

Conversation

aansaarii
Copy link
Contributor

In this PR, I've added the ability to fix the number of Nginx workers after the Nginx installation. The default number of workers might not be sufficient to handle the clients' load. Using this PR, the server can set the appropriate number of workers to smaller or larger numbers based on the server's capabilities.

@aansaarii aansaarii requested review from Hnefi and xusine May 18, 2022 09:38
Copy link
Contributor

@xusine xusine left a comment

Choose a reason for hiding this comment

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

I think we should also update the document so that the potential users know they can set Nginx works.

@aansaarii
Copy link
Contributor Author

A new commit is added to this PR: "fixed port allocation of httperf"
The problem is that httperf creates a map to keep track of the ports that it allocates. Httperf lookups this map to find a free port to assign it to a connection. However, another process on the machine might already allocate the found port. Consequently, the binding phase would fail and httperf searches for another free port (check here and here). The point is that the found port is already flagged as not free during the lookup phase and if httperf cannot use this port, httperf will never have a chance to set the port as free in the future. As a result, httperf will run out of ports gradually while the ports are actually available on the machine because the processes that were using those ports have released the ports. I noticed this problem when I tried to run the benchmark with multiple httperf instances at the same time with high loads for around 10 minutes. The new commit updates the map as a port is allocated when the binding phase successfully binds the free port to the connection.

Copy link
Collaborator

@Hnefi Hnefi left a comment

Choose a reason for hiding this comment

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

Hi Ali,
Thanks for your work so far on this. I have added a bunch of comments into the individual changes, which we should fix before we merge anything. You can address them as you get time.

Also, we should change the name of this PR to something correct, because it currently contains many more changes than just setting the nginx worker count.

@aansaarii aansaarii changed the title set the number of Nginx workers Updating the media-streaming benchmark Jun 16, 2022
@aansaarii
Copy link
Contributor Author

The new commit adds support for TLS connections. It has basically two classes of changes. On the server side, the container installs OpenSSL and generates keys in the entrypoint. On the other hand, the client container creates a TLSv1.2 context. Moreover, now it has another parameter in the entrypoint which determines whether the benchmark uses plain text or encrypted connections.

@aansaarii
Copy link
Contributor Author

A new commit is added to update the TLS version from 1.2 to 1.3.

@aansaarii aansaarii force-pushed the fix_streaming_server branch from c7af6c0 to 399fced Compare July 25, 2022 12:02
Copy link
Collaborator

@Hnefi Hnefi left a comment

Choose a reason for hiding this comment

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

We can merge this after the following:

  • Let's address the comments in my review for documentation clarity.
  • We should fix the tests.

docs/benchmarks/media-streaming.md Outdated Show resolved Hide resolved
docs/benchmarks/media-streaming.md Outdated Show resolved Hide resolved
@xusine xusine self-requested a review September 12, 2022 15:13
xusine
xusine previously approved these changes Sep 12, 2022
Copy link
Collaborator

@Hnefi Hnefi left a comment

Choose a reason for hiding this comment

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

I have looked at as many of the changes as is possible, and approved the merging with two follow-ups (as discussed):

  1. It would be good to divide the documentation into a README file which describes simply how to run the benchmark, and a more detailed document (perhaps a PDF) with the architecture of the load generator, how to run an experiment, and how to set various parameters to create certain scenarios. This would give more structure to each file (i.e., the README which is visible by default just explains the architecture of the benchmark and how to run it, and then more details are available for those who are curious to tune it).
  2. We should attempt in future to set all editors so that they do not autoformat/change spacing of code. For example, it is not possible to review the changes to files such as core.c or videoperf.c because the changelist currently is polluted with simply re-spacing files or converting spaces back and forth to tabs.

@xusine xusine merged commit d9c7511 into main Sep 20, 2022
@UlisesLuzius UlisesLuzius deleted the fix_streaming_server branch February 13, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants