2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Remove queryperf from BIND 9 repository

This commit is contained in:
Ondřej Surý
2018-08-28 11:42:14 +02:00
parent 99f17b80b8
commit 1e404fdb0e
10 changed files with 0 additions and 6824 deletions

View File

@@ -1 +0,0 @@
queryperf

View File

@@ -1,28 +0,0 @@
# Copyright (C) 2000, 2001 Nominum, Inc. All Rights Reserved.
CC = @CC@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
DEFS = @DEFS@
queryperf: queryperf.o $(LIBOBJS)
$(CC) $(CFLAGS) $(DEFS) $(LDFLAGS) queryperf.o $(LIBOBJS) $(LIBS) -lm -o queryperf
queryperf.o: queryperf.c
$(CC) $(CFLAGS) $(DEFS) -c queryperf.c
# under missing subdir
getaddrinfo.o: ./missing/getaddrinfo.c
$(CC) $(CFLAGS) -c ./missing/$*.c
getnameinfo.o: ./missing/getnameinfo.c
$(CC) $(CFLAGS) -c ./missing/$*.c
clean:
rm -f *.o queryperf
distclean: clean
rm -f config.log
rm -f config.cache
rm -f config.status
rm -f Makefile

View File

@@ -1,79 +0,0 @@
This is queryperf, a DNS server query performance testing tool.
It is primarily intended for measuring the performance of
authoritative DNS servers, but it has also been used for measuring
caching server performance. This document describes the use of
queryperf for authoritative server performance testing.
Building
To build queryperf, just do
sh configure
make
The test environment
It is recommended that you run queryperf and the name server under
test on separate machines, so that the CPU usage of queryperf itself
does not slow down the name server. The two machines should be
connected with a fast network, preferably a dedicated 100baseT
segment. Testing through a router or firewall is not advisable.
Configuring the server
The name server under test should be set up as an authoritative
server, serving one or more zones similar in size and number to
what the server is expected to serve in production.
Be sure to turn off recursion in the server's configuration
(in BIND 8/9, specify "recursion no;" in the options block).
In BIND 8, you should also specify "fetch-glue no;"; otherwise
the server may attempt to retrieve glue information from the
Internet during the test, slowing it down by an unpredictable
factor.
Constructing the input file
You need to construct a queryperf input file containing a large and
realistic set of queries, on the order of ten thousand to a million.
The input file contains one line per query, consisting of a domain
name and an RR type name separated by a space. The class of the
query is implicitly IN.
When measuring the performance serving non-terminal zones such as the
root zone or TLDs, note that such servers spend most of their time
providing referral responses, not authoritative answers. Therefore, a
realistic input file might consist mostly of queries for type A for
names *below*, not at, the delegations present in the zone. For
example, when testing the performance of a server configured to be
authoritative for the top-level domain "fi.", which contains
delegations for domains like "helsinki.fi" and "turku.fi", the input
file could contain lines like
www.turku.fi A
www.helsinki.fi A
where the "www" prefix ensures that the server will respond with a
referral. Ideally, a realistic proportion of queries for nonexistent
domains should be mixed in with those for existing ones, and the lines
of the input file should be in a random order.
Running the tests
Queryperf is run specifying the input file using the "-d" option, as
in
queryperf -d input_file -s server
The output of queryperf is mostly self-explanatory. Pay attention to
the number of dropped packets reported - when running the test over a
local Ethernet connection, it should be zero. If one or more packets
has been dropped, there may be a problem with the network connection.
In that case, the results should be considered suspect and the test
repeated.

View File

@@ -1,34 +0,0 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the `gethostbyname2' function. */
#undef HAVE_GETHOSTBYNAME2
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define to 1 if `struct sockaddr' has element `sa_len'. */
#undef HAVE_SA_LEN
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to `int' if `socklen_t' does not exist. */
#undef socklen_t

File diff suppressed because it is too large Load Diff

View File

@@ -1,65 +0,0 @@
#
# Copyright (C) 2000, 2001 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
AC_INIT(queryperf.c)
AC_PREREQ(2.13)
AC_PROG_CC
AC_DEFUN(AC_TYPE_SOCKLEN_T,
[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
[
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>],
[socklen_t len = 42; return len;],
ac_cv_type_socklen_t=yes,
ac_cv_type_socklen_t=no)
])
if test $ac_cv_type_socklen_t != yes; then
AC_DEFINE(socklen_t, int, [Define to `int' if `socklen_t' does not exist.])
fi
])
AC_DEFUN(AC_SA_LEN,
[AC_CACHE_CHECK([for sa_len], ac_cv_sa_len,
[
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>],
[struct sockaddr sa; sa.sa_len = 0;],
ac_cv_sa_len=yes,
ac_cv_sa_len=no)
])
if test $ac_cv_sa_len = yes; then
AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if `struct sockaddr' has element `sa_len'.])
fi
])
AC_CONFIG_HEADERS(config.h)
AC_SEARCH_LIBS(res_mkquery, resolv bind)
AC_SEARCH_LIBS(__res_mkquery, resolv bind)
AC_SEARCH_LIBS(res_9_mkquery, resolv bind)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_ntoa)
AC_CHECK_FUNCS(gethostbyname2)
AC_TYPE_SOCKLEN_T
AC_SA_LEN
AC_OUTPUT(Makefile)

View File

@@ -1,6 +0,0 @@
; This is a comment
#server ns.sector93.ie
#port 53
#maxwait 5
meow.com MX
1.0.0.10.in-addr.arpa PTR

View File

@@ -1,13 +0,0 @@
; Sample input data file
;#server ns.sector93.ie
;#port 53
;#maxwait 10
1-host.com ANY
1-linknet.com A
1.0-127.35.195.200.in-addr.arpa PTR
1.0-63.236.210.200.in-addr.arpa PTR
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.int PTR
1.0.0.0.in-addr.arpa PTR
1.0.0.10.in-addr.arpa PTR

File diff suppressed because it is too large Load Diff

View File

@@ -1,116 +0,0 @@
#!/usr/bin/python
#
# Contributed by Stephane Bortzmeyer <bortzmeyer@nic.fr>
#
# "A small tool which may be useful with contrib/queryperf. This script
# can generate files of queries, both with random names (to test the
# behaviour with NXdomain) and with domains from a real zone file."
#
import getopt
import random
import re
import string
import sys
maxsize = 10
tld = 'org'
num = 4
percent_random = 0.3
gen = None
zone_file = None
domains = {}
domain_ns = r'^([a-z0-9-\.]+)((\s+\d+)?(\s+IN)?|(\s+IN)(\s+\d+)?)\s+NS'
domain_ns_re = re.compile(domain_ns, re.IGNORECASE)
def remove_tld(label, tld):
if label.endswith('.' + tld + '.'):
return label[0:-(1 + len(tld) + 1)]
else:
return label
# characters allowed in a label
LDH = string.digits + string.ascii_lowercase + "-"
def gen_random_label():
"""
Generate a random DNS label.
Note that this may generate labels that start/end with '-'.
"""
label = ""
for _ in range(gen.randint(1, maxsize)):
label = label + gen.choice(LDH)
return label
def make_domain(label):
return "www." + label + "." + tld + " A"
def usage():
sys.stdout.write("Usage: " + sys.argv[0] + " [-n number] " +
"[-p percent-random] [-t TLD]\n")
sys.stdout.write(" [-m MAXSIZE] [-f zone-file]\n")
try:
optlist, args = getopt.getopt(sys.argv[1:], "hp:f:n:t:m:",
["help", "percentrandom=", "zonefile=",
"number=", "tld=",
"maxsize="])
for option, value in optlist:
if option == "--help" or option == "-h":
usage()
sys.exit(0)
elif option == "--number" or option == "-n":
num = int(value)
elif option == "--maxsize" or option == "-m":
maxsize = int(value)
elif option == "--percentrandom" or option == "-p":
percent_random = float(value)
elif option == "--tld" or option == "-t":
tld = str(value)
elif option == "--zonefile" or option == "-f":
zone_file = str(value)
else:
getopt.error("Unknown option " + option)
except getopt.error as reason:
sys.stderr.write(sys.argv[0] + ": " + str(reason) + "\n")
usage()
sys.exit(1)
if len(args) > 0:
usage()
sys.exit(1)
gen = random.Random()
if zone_file:
file = open(zone_file)
line = file.readline()
while line:
domain_line = domain_ns_re.match(line)
if domain_line:
print(domain_line.group(1))
domain = remove_tld(domain_line.group(1), tld)
domains[domain] = 1
line = file.readline()
file.close()
if zone_file:
if not domains:
sys.stderr.write("No domains found in '%s'\n" % zone_file)
sys.exit(1)
domain_names = list(domains.keys())
for i in range(num):
if zone_file:
if gen.random() < percent_random:
sys.stdout.write(make_domain(gen_random_label()))
else:
sys.stdout.write(make_domain(gen.choice(domain_names)))
else:
sys.stdout.write(make_domain(gen_random_label()))
sys.stdout.write("\n")