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

Allow running perf client and server within dockers #1659

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

stormshield-damiend
Copy link
Contributor

Add a way to run perf_client and perf_server within two dockers with optional simulated latency.

To build the binaries and the docker, use :
build.sh

To launch the server, use :
./run-server.sh -l 10 -c -o

This will :

  • simulate a latency of 10ms using Linux kernel QOS
  • capture all packets using tcpdump inside the docker
  • open the capture with wireshark using the dumped keys

To launch the client, use :
./run-client.sh -l 10

This will launch perf_client for 5sec with a simulated latency of 10ms (we will the have a RTT of 10ms).

/!\ For now the GSO is disabled otherwise wireshark is not capable of deciphering packets.

@stormshield-damiend stormshield-damiend marked this pull request as draft September 5, 2023 15:50
Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

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

Maybe add set -eu to the shell scripts for robustness?

perf/docker/build.sh Show resolved Hide resolved
@Ralith
Copy link
Collaborator

Ralith commented Dec 3, 2023

This gets further now, but still fails before doing any testing:

> ./build.sh
[...]
[+] Building 33.1s (12/12) FINISHED                                             docker:default
 => [server internal] load build definition from Dockerfile                               0.0s
 => => transferring dockerfile: 353B                                                      0.0s
 => [server internal] load .dockerignore                                                  0.0s
 => => transferring context: 2B                                                           0.0s
 => [server internal] load metadata for docker.io/library/debian:bookworm-slim            0.0s
 => [server 1/7] FROM docker.io/library/debian:bookworm-slim                              0.0s
 => [server internal] load build context                                                  1.3s
 => => transferring context: 207.54MB                                                     1.3s
 => [server 2/7] RUN apt-get update && apt-get install -y procps iputils-ping iproute2   24.9s
 => [server 3/7] WORKDIR /root                                                            0.0s
 => [server 4/7] RUN mkdir -p .local/share/quinn                                          0.4s
 => [server 5/7] COPY ./entrypoint.sh .                                                   0.0s 
 => [server 6/7] COPY ./target/perf_client .                                              3.6s 
 => [server 7/7] COPY ./target/perf_server .                                              3.7s 
 => [server] exporting to image                                                           0.5s 
 => => exporting layers                                                                   0.5s
 => => writing image sha256:9daaad82df8dffc2849b4d3fb52d3121012ea804ff536c829ca67d6d518d  0.0s
 => => naming to docker.io/library/quinn_perf                                             0.0s
> ./run-server.sh -l 10 -c -o
Launching docker server
[+] Building 0.0s (0/0)                                                         docker:default
[+] Running 2/2
 ✔ Network docker_quinn-perf  Created                                                     0.1s 
 ✔ Container docker-server-1  Started                                                     0.0s 
Enforcing a latency of 10ms
Starting capture within docker
Launching quinn perf server
Error response from daemon: OCI runtime exec failed: exec failed: unable to start container process: exec /root/perf_server: no such file or directory: unknown

@stormshield-damiend
Copy link
Contributor Author

This gets further now, but still fails before doing any testing:

> ./build.sh
[...]
[+] Building 33.1s (12/12) FINISHED                                             docker:default
 => [server internal] load build definition from Dockerfile                               0.0s
 => => transferring dockerfile: 353B                                                      0.0s
 => [server internal] load .dockerignore                                                  0.0s
 => => transferring context: 2B                                                           0.0s
 => [server internal] load metadata for docker.io/library/debian:bookworm-slim            0.0s
 => [server 1/7] FROM docker.io/library/debian:bookworm-slim                              0.0s
 => [server internal] load build context                                                  1.3s
 => => transferring context: 207.54MB                                                     1.3s
 => [server 2/7] RUN apt-get update && apt-get install -y procps iputils-ping iproute2   24.9s
 => [server 3/7] WORKDIR /root                                                            0.0s
 => [server 4/7] RUN mkdir -p .local/share/quinn                                          0.4s
 => [server 5/7] COPY ./entrypoint.sh .                                                   0.0s 
 => [server 6/7] COPY ./target/perf_client .                                              3.6s 
 => [server 7/7] COPY ./target/perf_server .                                              3.7s 
 => [server] exporting to image                                                           0.5s 
 => => exporting layers                                                                   0.5s
 => => writing image sha256:9daaad82df8dffc2849b4d3fb52d3121012ea804ff536c829ca67d6d518d  0.0s
 => => naming to docker.io/library/quinn_perf                                             0.0s
> ./run-server.sh -l 10 -c -o
Launching docker server
[+] Building 0.0s (0/0)                                                         docker:default
[+] Running 2/2
 ✔ Network docker_quinn-perf  Created                                                     0.1s 
 ✔ Container docker-server-1  Started                                                     0.0s 
Enforcing a latency of 10ms
Starting capture within docker
Launching quinn perf server
Error response from daemon: OCI runtime exec failed: exec failed: unable to start container process: exec /root/perf_server: no such file or directory: unknown

i will rebase the work as it is quite old and see if i also have the issue.

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.

None yet

2 participants