### Clone, Build, and Run Torrust Tracker Locally Source: https://github.com/torrust/torrust-tracker/blob/develop/README.md This sequence of commands guides you through cloning the Torrust Tracker repository, setting up a basic SQLite database, running all tests, and finally starting the tracker locally. It requires Git and Rust toolchain to be installed. ```shell # Checkout repository into a new folder: git clone https://github.com/torrust/torrust-tracker.git # Change into directory and create an empty database file: cd torrust-tracker mkdir -p ./storage/tracker/lib/database/ touch ./storage/tracker/lib/database/sqlite3.db # Check all tests in application: cargo test --tests --benches --examples --workspace --all-targets --all-features # Run the tracker: cargo run ``` -------------------------------- ### Torrust Tracker API Request Example Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md An example of how to make a request to the Torrust Tracker API, including the necessary token for authentication. ```http https://127.0.0.1:1212/api/v1/stats?token=MySecretToken ``` -------------------------------- ### Torrust Tracker Podman Run Example Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md A complete shell script demonstrating how to build the Torrust Tracker Podman image and run it with essential configurations, including environment variables, port publishing, and volume mapping. ```sh ## Build Container Image podman build --target release --tag torrust-tracker:release --file Containerfile . ## Setup Mapped Volumes mkdir -p ./storage/tracker/lib/ ./storage/tracker/log/ ./storage/tracker/etc/ ## Run Torrust Tracker Container Image podman run -it \ --env TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN="MySecretToken" \ --env USER_ID="$(id -u)" \ --publish 0.0.0.0:7070:7070/tcp \ --publish 0.0.0.0:6969:6969/udp \ --publish 0.0.0.0:1212:1212/tcp \ --volume ./storage/tracker/lib:/var/lib/torrust/tracker:Z \ --volume ./storage/tracker/log:/var/log/torrust/tracker:Z \ --volume ./storage/tracker/etc:/etc/torrust/tracker:Z \ docker.io/torrust-tracker:release ``` -------------------------------- ### Torrust Tracker Docker Run Example Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md A complete shell script demonstrating how to build the Torrust Tracker Docker image and run it with essential configurations, including environment variables, port publishing, and volume mapping. ```sh ## Setup Docker Default Context docker context use default ## Build Container Image docker build --target release --tag torrust-tracker:release --file Containerfile . ## Setup Mapped Volumes mkdir -p ./storage/tracker/lib/ ./storage/tracker/log/ ./storage/tracker/etc/ ## Run Torrust Tracker Container Image docker run -it \ --env TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN="MySecretToken" \ --env USER_ID="$(id -u)" \ --publish 0.0.0.0:7070:7070/tcp \ --publish 0.0.0.0:6969:6969/udp \ --publish 0.0.0.0:1212:1212/tcp \ --volume ./storage/tracker/lib:/var/lib/torrust/tracker:Z \ --volume ./storage/tracker/log:/var/log/torrust/tracker:Z \ --volume ./storage/tracker/etc:/etc/torrust/tracker:Z \ torrust-tracker:release ``` -------------------------------- ### Torrust Tracker API Endpoint Example Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md An example of how to access the Torrust tracker's API. It shows the URL structure, including the container's IP address and the API port, along with a placeholder for an access token. ```APIDOC http://:1212/api/v1/stats?token=MyAccessToken ``` -------------------------------- ### Run Demo Environment Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Quickly launch the Torrust tracker with its default configuration using pre-built public Docker images. This is useful for testing or initial setup. ```sh docker run -it torrust/tracker:latest ``` ```sh podman run -it docker.io/torrust/tracker:latest ``` -------------------------------- ### Torrust Tracker MySQL Configuration Example Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md An example TOML configuration snippet showing how to configure the Torrust Tracker to use a MySQL database. This includes specifying the driver and connection string. ```toml [core.database] driver = "mysql" path = "mysql://db_user:db_user_secret_password@mysql:3306/torrust_tracker" ``` -------------------------------- ### Build and Run Torrust Tracker with Docker Compose Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Builds the Torrust Tracker release image using Docker and starts the application and its dependencies (MySQL) using Docker Compose. It also shows how to set environment variables for configuration. ```sh docker build --target release --tag torrust-tracker:release --file Containerfile . mkdir -p ./storage/tracker/lib/ ./storage/tracker/log/ ./storage/tracker/etc/ USER_ID=$(id -u) \ TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN="MySecretToken" \ docker compose up --build ``` -------------------------------- ### Install flamegraph Dependencies (Ubuntu) Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/profiling.md Installs `clang` and `lld`, essential dependencies for using the flamegraph profiling tool on Ubuntu systems. ```console sudo apt-get install clang lld ``` -------------------------------- ### Prometheus Output Example Source: https://github.com/torrust/torrust-tracker/blob/develop/packages/metrics/README.md An example of the output format generated by the `to_prometheus()` method, showing how metrics with labels are serialized according to Prometheus exposition format. ```output # HELP requests_total Total number of requests. # TYPE requests_total counter requests_total{protocol="http",server="tracker-01"} 1 # HELP active_connections Current number of active connections. # TYPE active_connections gauge active_connections{protocol="http",server="tracker-01"} 42 ``` -------------------------------- ### Run Torrust Tracker with Podman Source: https://github.com/torrust/torrust-tracker/blob/develop/README.md This snippet demonstrates running the Torrust Tracker using Podman, a daemonless container engine. It pulls the development image from Docker Hub and starts a container. Ensure Podman is installed and configured. ```shell podman run -it docker.io/torrust/tracker:develop ``` -------------------------------- ### Torrust Tracker UDP Announce URL Example Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Provides the UDP announce URL format for BitTorrent clients to connect to the Torrust tracker. It includes the tracker's IP address and the UDP port it is listening on. ```APIDOC udp://:6969 ``` -------------------------------- ### Run Torrust Tracker with Docker Source: https://github.com/torrust/torrust-tracker/blob/develop/README.md This snippet shows how to run the Torrust Tracker using Docker. It pulls the latest development image and starts a container, making the tracker accessible. Ensure Docker is installed and running. ```shell docker run -it torrust/tracker:develop ``` -------------------------------- ### Install Aquatic UDP and HTTP Load Test Tools Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md Installs the necessary command-line tools for running UDP and HTTP load tests using the aquatic project. This requires the Cargo build tool. ```console cargo install aquatic_udp_load_test && cargo install aquatic_http_load_test ``` -------------------------------- ### Clone Repository Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Clones the Torrust tracker source code from GitHub and navigates into the newly created directory. This is the first step for building the container from source. ```sh # Inside your dev folder git clone https://github.com/torrust/torrust-tracker.git; cd torrust-tracker ``` -------------------------------- ### Run Aquatic UDP Tracker Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md Commands to clone, build, and run the Aquatic UDP Tracker. It includes generating a default configuration file and then starting the tracker with that configuration. ```console git clone git@github.com:greatest-ape/aquatic.git cd aquatic cargo build --release -p aquatic_udp ./target/release/aquatic_udp -p > "aquatic-udp-config.toml" ./target/release/aquatic_udp -c "aquatic-udp-config.toml" ``` -------------------------------- ### Docker CLI: List Running Containers Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Displays a list of currently running Docker containers. This command is used to verify that the Torrust tracker container has started successfully and to view its assigned IP address and port mappings. ```shell $ docker ps CONTAINER ID IMAGE COMMAND STATUS PORTS intelligent-hawking registry.hub.docker.com/torrust/tracker:latest Running 4.236.213.57:6969->6969/udp, 4.236.213.57:1212->1212/tcp ``` -------------------------------- ### Build and Run Tracker for Flamegraph Profiling Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/profiling.md Commands to build the tracker with profiling enabled, run a load test, and then execute the flamegraph profiler against the tracker binary. Requires the `aquatic_udp_load_test` script and the `flamegraph` executable. ```console cargo build --profile=release-debug --bin=profiling ./target/release/aquatic_udp_load_test -c "load-test-config.toml" sudo TORRUST_TRACKER_CONFIG_TOML_PATH="./share/default/config/tracker.udp.benchmarking.toml" /home/USER/.cargo/bin/flamegraph -- ./target/release-debug/profiling 60 ``` -------------------------------- ### Tracker Checker: Configuration Example (Console) Source: https://github.com/torrust/torrust-tracker/blob/develop/console/tracker-client/README.md Shows how to configure and run the Tracker Checker tool. It uses an environment variable to define lists of UDP trackers, HTTP trackers, and health check URLs to monitor. ```console TORRUST_CHECKER_CONFIG='{ "udp_trackers": ["127.0.0.1:6969"], "http_trackers": ["http://127.0.0.1:7070"], "health_checks": ["http://127.0.0.1:1212/api/health_check"] }' cargo run --bin tracker_checker ``` -------------------------------- ### su-exec User and Group Specification Example Source: https://github.com/torrust/torrust-tracker/blob/develop/contrib/dev-tools/su-exec/README.md Illustrates how to specify both a username and a group ID for privilege switching. Numeric IDs can also be used. ```shell $ su-exec apache:1000 /usr/sbin/httpd -f /opt/www/httpd.conf ``` -------------------------------- ### Example Benchmark Output Source: https://github.com/torrust/torrust-tracker/blob/develop/packages/torrent-repository-benchmarking/README.md Illustrates a partial output from running the benchmark command, showing the measured execution times for different benchmark cases like 'add_one_torrent/RwLockStd'. It includes statistical outliers. ```output Running benches/repository_benchmark.rs (target/release/deps/repository_benchmark-a9b0013c8d09c3c3) add_one_torrent/RwLockStd time: [63.057 ns 63.242 ns 63.506 ns] Found 12 outliers among 100 measurements (12.00%) 2 (2.00%) low severe 2 (2.00%) low mild 2 (2.00%) high mild 6 (6.00%) high severe add_one_torrent/RwLockStdMutexStd time: [62.505 ns 63.077 ns 63.817 ns] ``` -------------------------------- ### Torrust Tracker Host-Mapped Volumes Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Explains how to map host directories to container volumes for persistent storage and better administration. This includes data, logs, and configuration directories. ```APIDOC Host-Mapped Volumes: Format: `--volume=[host-src:]container-dest[:]` Default mappings for persistence: `--volume ./storage/tracker/lib:/var/lib/torrust/tracker:Z` (Data storage) `--volume ./storage/tracker/log:/var/log/torrust/tracker:Z` (Log files) `--volume ./storage/tracker/etc:/etc/torrust/tracker:Z` (Configuration files) Note: The `:Z` option is for SELinux compatibility (read-write). Use `:rw` if `:Z` causes issues. ``` -------------------------------- ### Analyze Valgrind Output with kcachegrind Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/profiling.md Opens the `callgrind.out` file generated by Valgrind with the `kcachegrind` tool, providing a graphical interface to visualize and analyze the profiling data. ```console kcachegrind callgrind.out ``` -------------------------------- ### Benchmark Output Example (Output) Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md An example of the output produced by the Cargo benchmark runner. It displays the execution time for different implementations of torrent storage, highlighting outliers and measurement details. ```output Running benches/repository_benchmark.rs (target/release/deps/repository_benchmark-2f7830898bbdfba4) add_one_torrent/RwLockStd time: [60.936 ns 61.383 ns 61.764 ns] Found 24 outliers among 100 measurements (24.00%) 15 (15.00%) high mild 9 (9.00%) high severe add_one_torrent/RwLockStdMutexStd time: [60.829 ns 60.937 ns 61.053 ns] Found 1 outlier among 100 measurements (1.00%) 1 (1.00%) high severe add_one_torrent/RwLockStdMutexTokio time: [96.034 ns 96.243 ns 96.545 ns] Found 6 outliers among 100 measurements (6.00%) 4 (4.00%) high mild 2 (2.00%) high severe add_one_torrent/RwLockTokio time: [108.25 ns 108.66 ns 109.06 ns] Found 2 outliers among 100 measurements (2.00%) 2 (2.00%) low mild add_one_torrent/RwLockTokioMutexStd time: [109.03 ns 109.11 ns 109.19 ns] Found 4 outliers among 100 measurements (4.00%) 1 (1.00%) low mild 1 (1.00%) high mild 2 (2.00%) high severe Benchmarking add_one_torrent/RwLockTokioMutexTokio: Collecting 100 samples in estimated 1.0003 s (7.1M iterationsadd_one_torrent/RwLockTokioMutexTokio time: [139.64 ns 140.11 ns 140.62 ns] ``` -------------------------------- ### Run Built Container Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Launches the Torrust tracker container after it has been built. Allows running either the release or debug version of the image. ```sh # Release Mode docker run -it torrust-tracker:release ``` ```sh # Debug Mode docker run -it torrust-tracker:debug ``` ```sh # Release Mode podman run -it docker.io/torrust-tracker:release ``` ```sh # Debug Mode podman run -it docker.io/torrust-tracker:debug ``` -------------------------------- ### Create Host-Mapped Folders Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Command to create the necessary host directories that will be mapped to the container's volumes. This ensures the container has a place to store its data. ```sh mkdir -p ./storage/tracker/lib/ ./storage/tracker/log/ ./storage/tracker/etc/ ``` -------------------------------- ### Aquatic UDP Tracker Load Test Output Example Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md Example output from the aquatic UDP load test when run against the Aquatic UDP Tracker. Shows high performance metrics for requests and responses. ```output Requests out: 432896.42/second Responses in: 389577.70/second - Connect responses: 192864.02 - Announce responses: 192817.55 - Scrape responses: 3896.13 - Error responses: 0.00 Peers per announce response: 21.55 Announce responses per info hash: - p10: 1 - p25: 1 - p50: 1 - p75: 1 - p90: 2 - p95: 3 - p99: 105 - p99.9: 311 - p100: 395 ``` -------------------------------- ### Torrust-Actix UDP Tracker Load Test Output Example Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md Example output from the aquatic UDP load test when run against the Torrust-Actix UDP Tracker. Shows lower performance metrics compared to Aquatic and Torrust. ```output Requests out: 200953.97/second Responses in: 180858.14/second - Connect responses: 89517.13 - Announce responses: 89539.67 - Scrape responses: 1801.34 - Error responses: 0.00 Peers per announce response: 1.00 Announce responses per info hash: - p10: 1 - p25: 1 - p50: 1 - p75: 1 - p90: 2 - p95: 7 - p99: 87 - p99.9: 155 - p100: 188 ``` -------------------------------- ### Build and Run Tracker for Valgrind Profiling Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/profiling.md Builds the tracker with debug symbols (`-g`) and then runs it using `valgrind` with the `callgrind` tool to collect profiling data. The output is saved to `callgrind.out` for analysis with `kcachegrind`. ```console RUSTFLAGS='-g' cargo build --release --bin profiling \ && export TORRUST_TRACKER_CONFIG_TOML_PATH="./share/default/config/tracker.udp.benchmarking.toml" \ && valgrind \ --tool=callgrind \ --callgrind-out-file=callgrind.out \ --collect-jumps=yes \ --simulate-cache=yes \ ./target/release/profiling 60 ``` -------------------------------- ### Build Container Image Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Builds the Torrust tracker container image using either Docker or Podman. Supports building for release or debug modes, specifying the target and tag. ```sh # Release Mode docker build --target release --tag torrust-tracker:release --file Containerfile . ``` ```sh # Debug Mode docker build --target debug --tag torrust-tracker:debug --file Containerfile . ``` ```sh # Release Mode podman build --target release --tag torrust-tracker:release --file Containerfile . ``` ```sh # Debug Mode podman build --target debug --tag torrust-tracker:debug --file Containerfile . ``` -------------------------------- ### Access MySQL Container and Database Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Provides commands to open a shell within the MySQL Docker container and connect to the MySQL server using the command-line client. ```sh docker exec -it torrust-mysql-1 /bin/bash docker compose exec mysql /bin/bash mysql -h127.0.0.1 -uroot -proot_secret_password ``` -------------------------------- ### Configure Cargo for Flamegraph Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/profiling.md Modifies the Cargo configuration file (`.cargo/config.toml`) to specify `clang` as the linker and `lld` as the linker for the `x86_64-unknown-linux-gnu` target, enabling flamegraph compatibility. ```toml [target.x86_64-unknown-linux-gnu] linker = "/usr/bin/clang" rustflags = ["-Clink-arg=-fuse-ld=lld", "-Clink-arg=-Wl,--no-rosegment"] ``` -------------------------------- ### Torrust Tracker Port Publishing Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Details how to publish container ports to the host using the `--publish` argument. This is crucial for making the tracker accessible from outside the container. ```APIDOC Socket Publishing: Format: `--publish [optional_host_ip]:[host_port]:[container_port]/[optional_protocol]` Example for default ports: `--publish 0.0.0.0:7070:7070/tcp` (HTTP Tracker) `--publish 0.0.0.0:6969:6969/udp` (UDP Tracker) `--publish 0.0.0.0:1212:1212/tcp` (Tracker API) Note: Exposing sockets with `0.0.0.0` inside the container is necessary for host accessibility. Ensure container configuration also uses wildcard addresses. ``` -------------------------------- ### Torrust Tracker Docker Container Status Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Displays the status of running Docker containers, showing the torrust-tracker and mysql images, their commands, status, and exposed ports. ```docker $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 06feacb91a9e torrust-tracker "cargo run" 18 minutes ago Up 4 seconds 0.0.0.0:1212->1212/tcp, :::1212->1212/tcp, 0.0.0.0:7070->7070/tcp, :::7070->7070/tcp, 0.0.0.0:6969->6969/udp, :::6969->6969/udp torrust-tracker-1 34d29e792ee2 mysql:8.0 "docker-entrypoint.s…" 18 minutes ago Up 5 seconds (healthy) 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp torrust-mysql-1 ``` -------------------------------- ### Torrust Tracker SSL Certificate Configuration Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Demonstrates how to configure SSL certificates for the Torrust Tracker's HTTP API and tracker components by specifying certificate and key paths in the tracker.toml configuration file. ```toml [http_trackers.tsl_config] ssl_cert_path = "./storage/tracker/lib/tls/localhost.crt" ssl_key_path = "./storage/tracker/lib/tls/localhost.key" [http_api.tsl_config] ssl_cert_path = "./storage/http_api/lib/tls/localhost.crt" ssl_key_path = "./storage/http_api/lib/tls/localhost.key" ``` -------------------------------- ### Torrust Tracker Environmental Variables Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Lists and describes the environmental variables that can be used to configure the Torrust Tracker. These variables allow overriding default settings or providing specific configurations like tokens and paths. ```APIDOC Environmental Variables: - TORRUST_TRACKER_CONFIG_TOML_PATH: Path to the tracker configuration file within the container. Default: "/etc/torrust/tracker/tracker.toml". - TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN: Overrides the admin token set in the configuration file. - TORRUST_TRACKER_CONFIG_OVERRIDE_CORE__DATABASE__DRIVER: Specifies the database driver for the container (e.g., `sqlite3`, `mysql`). Default: `sqlite3`. Note: This does not override the database configuration within the `.toml` file. - TORRUST_TRACKER_CONFIG_TOML: Load configuration directly from this environmental variable instead of a file. - USER_ID: The user ID for the runtime created `torrust` user. Should match host volume ownership. Default: `1000`. - UDP_PORT: The port for the UDP tracker. Should match the configuration. Default: `6969`. - HTTP_PORT: The port for the HTTP tracker. Should match the configuration. Default: `7070`. - API_PORT: The port for the tracker API. Should match the configuration. Default: `1212`. - HEALTH_CHECK_API_PORT: The port for the Health Check API. Should match the configuration. Default: `1313`. ``` -------------------------------- ### Clone, Build, and Run Torrust-Actix Tracker Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md Commands to clone the torrust-actix repository, build the release executable, create a default configuration, and then run the tracker. ```console git clone https://github.com/Power2All/torrust-actix.git cd torrust-actix cargo build --release ./target/release/torrust-actix --create-config ./target/release/torrust-actix ``` -------------------------------- ### Torrust Tracker API SSL Enabled Request Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md An example of accessing the Torrust Tracker API when SSL is enabled, using HTTPS and the specified port. ```http https://localhost:1212/api/v1/stats?token=MyAccessToken ``` -------------------------------- ### Build and Run Torrust Tracker for UDP Benchmarking Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md Compiles the torrust-tracker in release mode and runs it using a specific configuration file optimized for UDP benchmarking. The configuration path is set via an environment variable. ```console cargo build --release TORRUST_TRACKER_CONFIG_TOML_PATH="./share/default/config/tracker.udp.benchmarking.toml" ./target/release/torrust-tracker ``` -------------------------------- ### Install gnuplot Package (Console) Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md Installs the gnuplot package, which is a requirement for certain analysis or visualization tools used with the project. This command uses the apt package manager. ```console sudo apt install gnuplot ``` -------------------------------- ### su-exec Basic Usage Source: https://github.com/torrust/torrust-tracker/blob/develop/contrib/dev-tools/su-exec/README.md Demonstrates the fundamental command-line syntax for su-exec. It takes a user specification (user or user:group) and the command to execute. ```shell su-exec user-spec command [ arguments... ] ``` -------------------------------- ### Run BitTorrent Tracker Core Tests Source: https://github.com/torrust/torrust-tracker/blob/develop/packages/tracker-core/README.md Executes the test suite for the bittorrent-tracker-core library. Setting the `TORRUST_TRACKER_CORE_RUN_MYSQL_DRIVER_TEST` environment variable to `true` includes tests for the MySQL driver, which requires Docker. ```console TORRUST_TRACKER_CORE_RUN_MYSQL_DRIVER_TEST=true cargo test ``` -------------------------------- ### Aquatic UDP Load Test Output Example (Info Log Threshold) Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md Example output from the aquatic UDP load test when the torrust-tracker is configured with an 'info' log threshold, demonstrating a significant performance decrease. ```output Requests out: 40719.21/second Responses in: 33762.72/second - Connect responses: 16732.76 - Announce responses: 16692.98 - Scrape responses: 336.98 - Error responses: 0.00 Peers per announce response: 0.00 Announce responses per info hash: - p10: 1 - p25: 1 - p50: 1 - p75: 1 - p90: 7 - p95: 14 - p99: 27 - p99.9: 35 - p100: 45 ``` -------------------------------- ### Aquatic UDP Load Test Output Example (Error Log Threshold) Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/benchmarking.md Example output from the aquatic UDP load test when the torrust-tracker is configured with an 'error' log threshold. Shows requests/responses per second and detailed statistics. ```output Starting client with config: Config { server_address: 127.0.0.1:6969, log_level: Error, workers: 1, duration: 0, summarize_last: 0, extra_statistics: true, network: NetworkConfig { multiple_client_ipv4s: true, sockets_per_worker: 4, recv_buffer: 8000000, }, requests: RequestConfig { number_of_torrents: 1000000, number_of_peers: 2000000, scrape_max_torrents: 10, announce_peers_wanted: 30, weight_connect: 50, weight_announce: 50, weight_scrape: 1, peer_seeder_probability: 0.75, }, } Requests out: 398367.11/second Responses in: 358530.40/second - Connect responses: 177567.60 - Announce responses: 177508.08 - Scrape responses: 3454.72 - Error responses: 0.00 Peers per announce response: 0.00 Announce responses per info hash: - p10: 1 - p25: 1 - p50: 1 - p75: 1 - p90: 2 - p95: 3 - p99: 105 - p99.9: 289 - p100: 361 ``` -------------------------------- ### Stop and Clean Docker Compose Resources Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Commands to stop the running Docker Compose services and optionally remove associated volumes, networks, and images. ```sh docker compose down docker compose down -v ``` -------------------------------- ### Run Tracker with Config Path Source: https://github.com/torrust/torrust-tracker/blob/develop/README.md Executes the Torrust tracker using a specified TOML configuration file path. This is a primary method for initializing the tracker with custom settings. ```sh TORRUST_TRACKER_CONFIG_TOML_PATH="./storage/tracker/etc/tracker.toml" cargo run ``` -------------------------------- ### Define Container Volumes Source: https://github.com/torrust/torrust-tracker/blob/develop/docs/containers.md Specifies the volumes that the Torrust tracker container will use for persistent data, logs, and configuration. These are typically mapped to host directories. ```Dockerfile VOLUME ["/var/lib/torrust/tracker","/var/log/torrust/tracker","/etc/torrust/tracker"] ``` -------------------------------- ### Configure Torrust Tracker for Development Source: https://github.com/torrust/torrust-tracker/blob/develop/README.md This snippet shows how to copy the default development configuration file and then customize it using a text editor like `vim`. This allows you to modify settings such as database connections or network interfaces for local testing. ```shell # Copy the default configuration into the standard location: mkdir -p ./storage/tracker/etc/ cp ./share/default/config/tracker.development.sqlite3.toml ./storage/tracker/etc/tracker.toml # Customize the tracker configuration (for example): vim ./storage/tracker/etc/tracker.toml ```