网络环境:机房局域网百兆共享下两台机器
机器配置:被测试机器(主) 双核 2.4GMZ,缓存2M 内存 1G scsi硬盘
测试机器(从) 双核 3.0GMZ,缓存1M 内存 1G scsi硬盘
软件环境:主dns装有两套软件bind 9.4.2 (源代码编译,数据存储用文本)和mydns(数据存储用mysql数据库);运行一个相同的域并且记录也一模一样;禁用递归,此服务器用作权威dns只供客户查询域名。
测试软件:bind自带的queryperf
测试目的:bind和mydns性能比较
测试结果:
运行bind后,测试结果如下
[root@dns2 queryperf]# ./queryperf -d ceshijilu1 -s 8.8.8.8 -l 50
DNS Query Performance Testing Tool
Version: $Id: queryperf.c,v 1.8.192.4 2007/09/05 07:44:57 marka Exp $
[Status] Processing input data
[Status] Sending queries (beginning with 8.8.8.
[Timeout] Query timed out: msg id 27203
[Timeout] Query timed out: msg id 27206
[Timeout] Query timed out: msg id 33990
[Timeout] Query timed out: msg id 33991
[Timeout] Query timed out: msg id 32646
[Timeout] Query timed out: msg id 33176
[Timeout] Query timed out: msg id 51359
[Timeout] Query timed out: msg id 51360
[Timeout] Query timed out: msg id 51356
[Timeout] Query timed out: msg id 51689
[Timeout] Query timed out: msg id 38914
[Timeout] Query timed out: msg id 38915
[Timeout] Query timed out: msg id 27808
[Timeout] Query timed out: msg id 29492
[Timeout] Query timed out: msg id 22976
[Timeout] Query timed out: msg id 23424
[Timeout] Query timed out: msg id 22975
[Timeout] Query timed out: msg id 22978
[Status] Testing complete
Statistics:
Parse input file: multiple times
Run time limit: 50 seconds
Ran through file: 65110 times
Queries sent: 651107 queries
Queries completed: 651089 queries
Queries lost: 18 queries
Queries delayed(?): 0 queries
RTT max: 4.982963 sec
RTT min: 0.000292 sec
RTT average: 0.001386 sec
RTT std deviation: 0.012426 sec
RTT out of range: 0 queries
Percentage completed: 100.00%
Percentage lost: 0.00%
Started at: Fri Apr 25 16:33:22 2008
Finished at: Fri Apr 25 16:34:14 2008
Ran for: 52.047823 seconds
Queries per second: 12509.437715 qps
运行mydns后,测试结果如下:
[root@dns2 queryperf]# ./queryperf -d ceshijilu1 -s 8.8.8.8 -l 50
DNS Query Performance Testing Tool
Version: $Id: queryperf.c,v 1.8.192.4 2007/09/05 07:44:57 marka Exp $
[Status] Processing input data
[Status] Sending queries (beginning with 8.8.8.
[Timeout] Query timed out: msg id 41371
[Timeout] Query timed out: msg id 59114
[Timeout] Query timed out: msg id 59115
[Timeout] Query timed out: msg id 60245
[Timeout] Query timed out: msg id 45718
[Timeout] Query timed out: msg id 45719
[Timeout] Query timed out: msg id 24314
[Timeout] Query timed out: msg id 48708
[Timeout] Query timed out: msg id 17972
[Timeout] Query timed out: msg id 14039
[Timeout] Query timed out: msg id 17547
[Timeout] Query timed out: msg id 54378
[Timeout] Query timed out: msg id 14040
[Timeout] Query timed out: msg id 26239
[Timeout] Query timed out: msg id 54858
[Timeout] Query timed out: msg id 37714
[Timeout] Query timed out: msg id 49891
[Timeout] Query timed out: msg id 49890
[Timeout] Query timed out: msg id 3111
[Timeout] Query timed out: msg id 49889
[Timeout] Query timed out: msg id 61291
[Timeout] Query timed out: msg id 3110
[Timeout] Query timed out: msg id 55025
[Timeout] Query timed out: msg id 54566
[Timeout] Query timed out: msg id 55026
[Timeout] Query timed out: msg id 54565
[Timeout] Query timed out: msg id 25382
[Status] Testing complete
Statistics:
Parse input file: multiple times
Run time limit: 50 seconds
Ran through file: 161341 times
Queries sent: 1613411 queries
Queries completed: 1613384 queries
Queries lost: 27 queries
Queries delayed(?): 0 queries
RTT max: 4.080192 sec
RTT min: 0.000127 sec
RTT average: 0.000505 sec
RTT std deviation: 0.008259 sec
RTT out of range: 0 queries
Percentage completed: 100.00%
Percentage lost: 0.00%
Started at: Fri Apr 25 16:37:12 2008
Finished at: Fri Apr 25 16:38:07 2008
Ran for: 54.526942 seconds
Queries per second: 29588.748989 qps
从Queries per second参数来看,mydns的性能(29588.748989 )要比bind(12509.437715)强很多,大约二倍。
测试过之后都想把现在用的bind服务器换成mydns。
文章来源于领测软件测试网 https://www.ltesting.net/