Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
953 changes: 569 additions & 384 deletions Cargo.lock

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ Then, generate a new vmlinux file as follows:
bpftool btf dump file /sys/kernel/btf/vmlinux format c > include/vmlinux.h
```

For Neqo, the following additional dependencies are needed: `libnss3`. While the distributed versions are not up to date, we will use a static version in `static_dependencies/neqo_dependencies`.
In order to use it, you need to set the following environment variables:
```shell
export LD_LIBRARY_PATH=$(pwd)/static_dependencies/neqo_dependencies/dist/Release/lib
export NSS_DIR=$(pwd)/static_dependencies/neqo_dependencies/nss
export NSS_PREBUILT=1
```
For Neqo, the following additional dependencies are needed: `libnss3`. While the distributed versions are not up to date, the corresponding libraries need to be compiled manually. See below in *Details: NSS Dependency*.

Now you can run a performance test as follows:
```
Expand All @@ -53,15 +47,17 @@ cargo test -p nesquic --features quinn
cargo test -p nesquic --features quiche
cargo test -p nesquic --features neqo
cargo test -p nesquic --features noq
# start the metric collection services (prometheus and grafana)
# start the metric collection services (InfluxDB and grafana)
docker compose -f docker/backend.yml up -d
# set up the dashboards
export NQ_LIBS="quinn quiche neqo"
script/dashboard.sh
# update run.sh to the correct CPU-range; if you are running a bare-metal
# benchmark, enable NESQUIC_BENACHMARK=1.
# run the test scenarios for a given library
script/run.sh quinn quiche
# the label can be used later to identify past runs. If no value is supplied,
# the label is set to "default".
NESQUIC_RUN_LABEL=firstRun script/run.sh quinn quiche
```

This starts the Grafana dashboard and executes a performance test. The dashboard is hosted at `http://localhost:3000`
Expand All @@ -80,7 +76,7 @@ docker volume rm nesquic_grafana_data

## Details: NSS Dependency

In order to create the static verion of Neqo's dependency libraries (NSS and NSPR), the following process which follows Neqo's README was used:
In order to create the static verion of Neqo's dependency libraries (NSS and NSPR), the following process which follows Neqo's README is used:
```shell
apt install ninja-build mercurial
uv tool install gyp-next
Expand All @@ -98,25 +94,29 @@ mkdir -p ~/nesquic/static_dependencies/neqo_dependencies
cp -r ~/neqo_depencencies/dist ~/nesquic/static_dependencies/neqo_dependencies/
mdkir -p ~/nesquic/static_dependencies/neqo_dependencies/nss
mdkir -p ~/nesquic/static_dependencies/neqo_dependencies/nspr
touch ~/nesquic/static_dependencies/neqo_dependencies/nss/.gitkeep
touch ~/nesquic/static_dependencies/neqo_dependencies/nspr/.gitkeep
export LD_LIBRARY_PATH=$(pwd)/static_dependencies/neqo_dependencies/dist/Release/lib
export NSS_DIR=$(pwd)/static_dependencies/neqo_dependencies/nss
export NSS_PREBUILT=1

# for running with the custom built dependencies, need to install them first
# for running the custom built dependencies, need to install them first
cd ~/nesquic
echo "$(pwd)/static_dependencies/neqo_dependencies/dist/Release/lib" | sudo tee /etc/ld.so.conf.d/nesquic.conf
sudo ldconfig
ldconfig -p | grep static_dependencies/neqo_dependencies/dist/Release/lib/libnss3.so
```

## NSS Database setup
The NSS Database is set up already and only needs to be changed if the cert changes.

Then, the following process should be used:

```shell
sudo apt isntall libnss3-tools
certutil -N -d res/nssdb
openssl pkcs12 -export -in res/pem/cert.pem -inkey res/pem/key.pem -out res/pkcs12/cert.p12 -name "nesquic"
certutil -N -d res/nssdb
pk12util -i res/pkcs12/cert.p12 -d res/nssdb
certutil -L -d nssdb
certutil -M -t "TC,C,C" -n nesquic -d nssdb
certutil -L -d nssdb
certutil -L -d nssdb
```
38 changes: 14 additions & 24 deletions docker/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,26 @@ networks:

volumes:
grafana_data:
prometheus_data:
influxdb_data:

services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
influxdb:
image: influxdb:2
container_name: influxdb
networks:
- nesquic
restart: unless-stopped
ports:
- "9092:9090"
- "8086:8086"
volumes:
- prometheus_data:/etc/prometheus
- ./prometheus/config.yml:/etc/prometheus/prometheus.yml:ro
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--query.lookback-delta=1y"
- "--storage.tsdb.retention.time=1y"
- "--web.console.libraries=/etc/prometheus/console_libraries"
- "--web.console.templates=/etc/prometheus/consoles"
- "--web.enable-lifecycle"

pushgateway:
image: prom/pushgateway:latest
container_name: pushgateway
networks:
- nesquic
restart: unless-stopped
ports:
- "9091:9091"
- influxdb_data:/var/lib/influxdb2
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUX_ADMIN_USER:-admin}
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUX_ADMIN_PASSWORD:-nesquicadmin}
- DOCKER_INFLUXDB_INIT_ORG=${INFLUX_ORG:-nesquic}
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUX_BUCKET:-nesquic}
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUX_TOKEN:-nesquic-token}

grafana:
image: grafana/grafana:latest
Expand All @@ -48,7 +38,7 @@ services:
ports:
- "3000:3000"
depends_on:
- prometheus
- influxdb
user: root
volumes:
- grafana_data:/var/lib/grafana
Expand Down
Loading
Loading