Use Queryperf to stress test a DNS server

Source: Internet
Author: User

I. Introduction of QUERPERF

When we configure the DNS server, we will certainly want to test the performance of the DNS server, after the online if the number of requests enough server can respond? Therefore, we can use the software simulation environment, the DNS server for evaluation of testing. In bind, there is a self-contained pressure test software, Queryperf. Using this software can test the DNS server, and the use of simple methods, we can use queryperf test multiple times, take an average, so that even if the results are inaccurate, and the actual situation is not too large.

Second, Queryperf installation

1, Queryperf is bind comes with the test software, so we directly before the network download bind, decompression can find Queryperf installation package.

1 wget http://www.isc.org/downloads/file/bind-9-8-7rc2/?version=tar.gz

2, do not know why, this file download finished name is this, index.html\?version\=tar.gz, OK let's unzip it.

1 tar xf index.html\?version\=tar.gz

3, after decompression, to find the directory contrib, bind the third-party software is all in this directory, we want to use the Queryperf is also in the inside.

4. Enter the Queryperf directory and start compiling the installation. You can use the./configure-h to view the installation help, but we will install it by default.

1 ./configure

1 make

5, through the above compilation, expand the Queryperf directory, in this directory has generated a queryperf executable file. This file is the program we need to use, we will move the program to the/usr/bin/directory can be used.

1 cp queryperf /usr/bin/

Third, test the DNS server with Queryperf

Before testing, we set up the DNS server first. We take the domain name wubinary.com as an example, set up a DNS server, dns.wubinary.com.

1, the wubinary.com area of the resource record file Wubinary.com.zone content as follows.

2. Test whether the DNS server is working properly.

Restart the service:

Test the domain name blog.wubinary.com

The DNS server works fine, and then you can use Queryperf for stress testing.

3, Queryperf use format:

1 queryperf [-d datafile] [-s server_addr] [-p port] [-q num_queries]

-D: followed by a file, the contents of the file is the user's request for DNS, a request for a behavior, so in order to test, we can write thousands of tens of thousands of.

-s:dns server Address

-p:dns Server Port

-Q: How many times do I request

First create a request file using the VIM command: Vim querytest.txt

These records are far from enough, we use vim command 1, $y copy.

Libedovan, let's start the test.

4, performance testing.

Execute command:

1 queryperf -d querytest.txt -s 192.168.0.6

Use the top command at this point to see CPU and memory utilization.

The results are as follows:

The test process is complete and can be averaged over several tests.

Iv. Summary of Performance test

1, in the performance testing of the server, it is best not to use the test software testing on the server platform itself, it is better to change another machine, so that the results of CPU processing will be more accurate.

2, the test first estimate the platform will encounter the maximum number of requests, with this number of requests for testing, possibilities, because if the server encountered large traffic DDoS, a single machine performance is good, also can not carry.

3, when using Queryperf for performance testing, it is best to test multiple times, averaging.

4, can modify the configuration file part of the parameter test, such as, turn on recursion, open the query log and other functions for testing.

5. Other open source testing tools, Tcpcopy

Use Queryperf to stress test a DNS server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.