mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Merge pull request #193 from greatest-ape/bencher-work
bencher: improve docs, improve result fairness when running non-virtualized
This commit is contained in:
commit
842dd89292
3 changed files with 140 additions and 6 deletions
12
README.md
12
README.md
|
|
@ -40,6 +40,18 @@ More benchmark details are available [here](./documents/aquatic-udp-load-test-20
|
|||
Please refer to the README pages for the respective implementations listed in
|
||||
the table above.
|
||||
|
||||
## Support applications
|
||||
|
||||
There are also a few support applications:
|
||||
|
||||
- [aquatic_udp_load_test](./crates/udp_load_test/) - UDP BitTorrent tracker load tester
|
||||
- [aquatic_http_load_test](./crates/http_load_test/) - HTTP BitTorrent tracker load tester
|
||||
- [aquatic_ws_load_test](./crates/ws_load_test/) - WebTorrent tracker load tester
|
||||
|
||||
and
|
||||
|
||||
- [aquatic_bencher](./crates/bencher/) - automated tracker benchmarking
|
||||
|
||||
## Copyright and license
|
||||
|
||||
Copyright (c) Joakim Frostegård
|
||||
|
|
|
|||
|
|
@ -4,11 +4,109 @@ Automated benchmarking of aquatic and other BitTorrent trackers.
|
|||
|
||||
Requires Linux 6.0 or later.
|
||||
|
||||
## Supported trackers by protocol
|
||||
Currently, only UDP BitTorrent tracker support is implemented.
|
||||
|
||||
### UDP
|
||||
## UDP
|
||||
|
||||
- [aquatic_udp](https://github.com/greatest-ape/aquatic/)
|
||||
- [opentracker](https://erdgeist.org/arts/software/opentracker/)
|
||||
- [chihaya](https://github.com/chihaya/chihaya)
|
||||
- [torrust-tracker](https://github.com/torrust/torrust-tracker)
|
||||
| Name | Commit |
|
||||
|-------------------|-----------------------|
|
||||
| [aquatic_udp] | (use same as bencher) |
|
||||
| [opentracker] | 110868e |
|
||||
| [chihaya] | 2f79440 |
|
||||
| [torrust-tracker] | 47c2fe2 |
|
||||
|
||||
The commits listed are ones known to work. It might be a good idea to first
|
||||
test with the latest commits for each project, and if they don't seem to work,
|
||||
revert to the listed commits.
|
||||
|
||||
Chihaya is known to crash under high load.
|
||||
|
||||
[aquatic_udp]: https://github.com/greatest-ape/aquatic/
|
||||
[opentracker]: http://erdgeist.org/arts/software/opentracker/
|
||||
[chihaya]: https://github.com/chihaya/chihaya
|
||||
[torrust-tracker]: https://github.com/torrust/torrust-tracker
|
||||
|
||||
### Usage
|
||||
|
||||
Install dependencies. This is done differently for different Linux
|
||||
distributions. On Debian 12, run:
|
||||
|
||||
```sh
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y curl cmake build-essential pkg-config git screen cvs zlib1g zlib1g-dev golang
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
source "$HOME/.cargo/env"
|
||||
```
|
||||
|
||||
Optionally install latest Linux kernel. On Debian 12, you can do so from backports:
|
||||
|
||||
```sh
|
||||
sudo echo "deb http://deb.debian.org/debian bookworm-backports main contrib" >> /etc/apt/sources.list
|
||||
sudo apt-get update && sudo apt-get install -y linux-image-amd64/bookworm-backports
|
||||
# You will have to restart to boot into the new kernel
|
||||
```
|
||||
|
||||
Compile aquatic_udp, aquatic_udp_load_test and aquatic_udp_bencher:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/greatest-ape/aquatic.git && cd aquatic
|
||||
# Optionally enable certain native platform optimizations
|
||||
. ./scripts/env-native-cpu-without-avx-512
|
||||
cargo build --profile "release-debug" -p aquatic_udp --features "io-uring"
|
||||
cargo build --profile "release-debug" -p aquatic_udp_load_test
|
||||
cargo build --profile "release-debug" -p aquatic_bencher --features udp
|
||||
cd ..
|
||||
```
|
||||
|
||||
Compile and install opentracker:
|
||||
|
||||
```sh
|
||||
cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co libowfat
|
||||
cd libowfat
|
||||
make
|
||||
cd ..
|
||||
git clone git://erdgeist.org/opentracker
|
||||
cd opentracker
|
||||
# Optionally enable native platform optimizations
|
||||
sed -i "s/^OPTS_production=-O3/OPTS_production=-O3 -march=native -mtune=native/g" Makefile
|
||||
make
|
||||
sudo cp ./opentracker /usr/local/bin/
|
||||
cd ..
|
||||
```
|
||||
|
||||
Compile and install chihaya:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/chihaya/chihaya.git
|
||||
cd chihaya
|
||||
go build ./cmd/chihaya
|
||||
sudo cp ./chihaya /usr/local/bin/
|
||||
```
|
||||
|
||||
Compile and install torrust-tracker:
|
||||
|
||||
```sh
|
||||
git clone git@github.com:torrust/torrust-tracker.git
|
||||
cd torrust-tracker
|
||||
cargo build --release
|
||||
cp ./target/release/torrust-tracker /usr/local/bin/
|
||||
```
|
||||
|
||||
You might need to raise locked memory limits:
|
||||
|
||||
```sh
|
||||
ulimit -l 65536
|
||||
```
|
||||
|
||||
Run the bencher:
|
||||
|
||||
```sh
|
||||
cd aquatic
|
||||
./target/release-debug/aquatic_bencher udp
|
||||
# or print info on command line arguments
|
||||
./target/release-debug/aquatic_bencher udp --help
|
||||
```
|
||||
|
||||
If you're running the load test on a virtual machine / virtual server, consider
|
||||
passing `--min-priority medium --cpu-mode subsequent-one-per-pair` for fairer
|
||||
results.
|
||||
|
|
|
|||
|
|
@ -65,13 +65,19 @@ impl UdpCommand {
|
|||
implementations: indexmap! {
|
||||
UdpTracker::Aquatic => vec![
|
||||
AquaticUdpRunner::with_mio(1, Priority::High),
|
||||
// Allow running two workers per core for aquatic and
|
||||
// opentracker. Skip this priority if testing on a
|
||||
// virtual machine
|
||||
AquaticUdpRunner::with_mio(2, Priority::Low),
|
||||
],
|
||||
UdpTracker::AquaticIoUring => vec![
|
||||
AquaticUdpRunner::with_io_uring(1, Priority::High),
|
||||
AquaticUdpRunner::with_io_uring(2, Priority::Low),
|
||||
],
|
||||
UdpTracker::OpenTracker => vec![
|
||||
OpenTrackerUdpRunner::new(0, Priority::Medium), // Handle requests within event loop
|
||||
OpenTrackerUdpRunner::new(1, Priority::High),
|
||||
OpenTrackerUdpRunner::new(2, Priority::Low),
|
||||
],
|
||||
UdpTracker::Chihaya => vec![
|
||||
ChihayaUdpRunner::new(),
|
||||
|
|
@ -89,12 +95,15 @@ impl UdpCommand {
|
|||
implementations: indexmap! {
|
||||
UdpTracker::Aquatic => vec![
|
||||
AquaticUdpRunner::with_mio(2, Priority::High),
|
||||
AquaticUdpRunner::with_mio(4, Priority::Low),
|
||||
],
|
||||
UdpTracker::AquaticIoUring => vec![
|
||||
AquaticUdpRunner::with_io_uring(2, Priority::High),
|
||||
AquaticUdpRunner::with_io_uring(4, Priority::Low),
|
||||
],
|
||||
UdpTracker::OpenTracker => vec![
|
||||
OpenTrackerUdpRunner::new(2, Priority::High),
|
||||
OpenTrackerUdpRunner::new(4, Priority::Low),
|
||||
],
|
||||
UdpTracker::Chihaya => vec![
|
||||
ChihayaUdpRunner::new(),
|
||||
|
|
@ -112,12 +121,15 @@ impl UdpCommand {
|
|||
implementations: indexmap! {
|
||||
UdpTracker::Aquatic => vec![
|
||||
AquaticUdpRunner::with_mio(4, Priority::High),
|
||||
AquaticUdpRunner::with_mio(8, Priority::Low),
|
||||
],
|
||||
UdpTracker::AquaticIoUring => vec![
|
||||
AquaticUdpRunner::with_io_uring(4, Priority::High),
|
||||
AquaticUdpRunner::with_io_uring(8, Priority::Low),
|
||||
],
|
||||
UdpTracker::OpenTracker => vec![
|
||||
OpenTrackerUdpRunner::new(4, Priority::High),
|
||||
OpenTrackerUdpRunner::new(8, Priority::Low),
|
||||
],
|
||||
UdpTracker::Chihaya => vec![
|
||||
ChihayaUdpRunner::new(),
|
||||
|
|
@ -135,12 +147,15 @@ impl UdpCommand {
|
|||
implementations: indexmap! {
|
||||
UdpTracker::Aquatic => vec![
|
||||
AquaticUdpRunner::with_mio(6, Priority::High),
|
||||
AquaticUdpRunner::with_mio(12, Priority::Low),
|
||||
],
|
||||
UdpTracker::AquaticIoUring => vec![
|
||||
AquaticUdpRunner::with_io_uring(6, Priority::High),
|
||||
AquaticUdpRunner::with_io_uring(12, Priority::Low),
|
||||
],
|
||||
UdpTracker::OpenTracker => vec![
|
||||
OpenTrackerUdpRunner::new(6, Priority::High),
|
||||
OpenTrackerUdpRunner::new(12, Priority::Low),
|
||||
],
|
||||
UdpTracker::Chihaya => vec![
|
||||
ChihayaUdpRunner::new(),
|
||||
|
|
@ -158,12 +173,15 @@ impl UdpCommand {
|
|||
implementations: indexmap! {
|
||||
UdpTracker::Aquatic => vec![
|
||||
AquaticUdpRunner::with_mio(8, Priority::High),
|
||||
AquaticUdpRunner::with_mio(16, Priority::Low),
|
||||
],
|
||||
UdpTracker::AquaticIoUring => vec![
|
||||
AquaticUdpRunner::with_io_uring(8, Priority::High),
|
||||
AquaticUdpRunner::with_io_uring(16, Priority::Low),
|
||||
],
|
||||
UdpTracker::OpenTracker => vec![
|
||||
OpenTrackerUdpRunner::new(8, Priority::High),
|
||||
OpenTrackerUdpRunner::new(16, Priority::Low),
|
||||
],
|
||||
UdpTracker::Chihaya => vec![
|
||||
ChihayaUdpRunner::new(),
|
||||
|
|
@ -181,12 +199,15 @@ impl UdpCommand {
|
|||
implementations: indexmap! {
|
||||
UdpTracker::Aquatic => vec![
|
||||
AquaticUdpRunner::with_mio(12, Priority::High),
|
||||
AquaticUdpRunner::with_mio(24, Priority::Low),
|
||||
],
|
||||
UdpTracker::AquaticIoUring => vec![
|
||||
AquaticUdpRunner::with_io_uring(12, Priority::High),
|
||||
AquaticUdpRunner::with_io_uring(24, Priority::Low),
|
||||
],
|
||||
UdpTracker::OpenTracker => vec![
|
||||
OpenTrackerUdpRunner::new(12, Priority::High),
|
||||
OpenTrackerUdpRunner::new(24, Priority::Low),
|
||||
],
|
||||
UdpTracker::Chihaya => vec![
|
||||
ChihayaUdpRunner::new(),
|
||||
|
|
@ -204,12 +225,15 @@ impl UdpCommand {
|
|||
implementations: indexmap! {
|
||||
UdpTracker::Aquatic => vec![
|
||||
AquaticUdpRunner::with_mio(16, Priority::High),
|
||||
AquaticUdpRunner::with_mio(32, Priority::Low),
|
||||
],
|
||||
UdpTracker::AquaticIoUring => vec![
|
||||
AquaticUdpRunner::with_io_uring(16, Priority::High),
|
||||
AquaticUdpRunner::with_io_uring(32, Priority::Low),
|
||||
],
|
||||
UdpTracker::OpenTracker => vec![
|
||||
OpenTrackerUdpRunner::new(16, Priority::High),
|
||||
OpenTrackerUdpRunner::new(32, Priority::Low),
|
||||
],
|
||||
UdpTracker::Chihaya => vec![
|
||||
ChihayaUdpRunner::new(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue