Skip to content

A suite of scripts for benchmarking DNS servers, measuring performance metrics like Queries Per Second (QPS) and average latency. The project includes functionalities for downloading DNS server lists, combining default servers, running benchmarks in parallel, and generating sorted results for informed DNS configuration decisions.

Notifications You must be signed in to change notification settings

panuozzo77/domain_name_speed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

This project provides a suite of scripts for benchmarking DNS servers. It allows users to test multiple DNS servers for their performance metrics, including Queries Per Second (QPS) and average latency. The results can be sorted and analyzed to enhance decision-making in DNS configurations.

Overview

The project consists of the following files:

  • benchmark.sh: The primary script for running DNS benchmarks against a list of DNS servers. This script downloads the latest DNS server list, combines it with default servers, runs benchmarks, and sorts the results.
  • default_dns_servers.txt: A file containing default DNS server IPs for benchmarking.
  • parallelized.sh: A version of the benchmark script that executes tests in parallel, improving performance by utilizing multiple threads.
  • results.txt: The output file where the raw results of the benchmarks are saved.
  • sorted_results.txt: The output file where the sorted results (by QPS) are stored.
  • combined_dns_servers.txt: A temporary file that combines the default DNS servers with the latest downloaded servers.
  • dns_servers.txt: The file that holds the latest DNS servers downloaded from the internet.
  • queries.txt: The file containing DNS query data used for testing.
  • useful: A directory or file that contains additional resources or scripts (provide context if it's a directory).

Features

  • Dynamic DNS Server Updates: Download and update the list of DNS servers from a reliable source.
  • Default Server Combination: Combine user-defined default DNS servers with the downloaded list for comparative analysis.
  • Performance Benchmarking: Benchmark DNS servers using the dnsperf tool to measure their performance.
  • Result Management: Save and sort results based on performance metrics for easy analysis.
  • Parallel Execution: Option for parallel execution to speed up the testing process and improve efficiency.
  • Saving On Exit: If an interrupt is detected, a results file will be generated, ensuring that no data is lost.

Prerequisites

  • Any Linux distribution
  • Ensure that the following tools are installed:
    • dnsperf: Benchmarking tool for DNS performance
    • parallel: Utility to execute tasks in parallel
    • curl: For downloading files
    • awk: For processing text files

You can typically install these using your package manager or by building them from source.

Usage

  1. Clone the repository:

    git clone https://github.com/yourusername/dns-benchmark.git
    cd dns-benchmark
  2. Adjust configuration as needed:

  • Review the various variables in the *.sh files to ensure they suit your situation. In particular:
  • dns_servers.txt: This file is fetched from a URL; choose one that suits your needs.
  • default_dns_servers.txt: Use this file to benchmark well-known DNS servers like Google and Cloudflare against others.
  • queries.txt: This file will be used to test the DNS servers with specific queries; you can source it from your Pi-hole or create your own.
  1. Run the benchmarks and enjoy!
  • Execute the benchmarking script with:
    ./benchmark.sh
  • For parallel execution, use:
    ./parallelized.sh

About

A suite of scripts for benchmarking DNS servers, measuring performance metrics like Queries Per Second (QPS) and average latency. The project includes functionalities for downloading DNS server lists, combining default servers, running benchmarks in parallel, and generating sorted results for informed DNS configuration decisions.

Topics

Resources

Stars

Watchers

Forks

Languages