PHP-DNS-SERVER icon indicating copy to clipboard operation
PHP-DNS-SERVER copied to clipboard

benchmark Test really slow

Open louishot opened this issue 1 year ago • 0 comments

I have make a benchmark Test

dnsperf Client (24 cores cpu) > 10GE NIC > PHP-DNS-SERVER (24 cores cpu)

<?php

require_once __DIR__.'/../vendor/autoload.php';

// JsonResolver created and provided with path to file with json dns records
$jsonResolver = new yswery\DNS\Resolver\JsonResolver([__DIR__.'/record.json', __DIR__.'/example.com.json']);

// System resolver acting as a fallback to the JsonResolver
$systemResolver = new yswery\DNS\Resolver\SystemResolver();

// StackableResolver will try each resolver in order and return the first match
$stackableResolver = new yswery\DNS\Resolver\StackableResolver([$jsonResolver, $systemResolver]);

// Create a new instance of Server class
$server = new yswery\DNS\Server($stackableResolver);

// Start DNS server
$server->start();
cat data.txt 
example.com A
./dnsperf -d data.txt -s 192.168.1.102 -Q 1000000 -c 1000

DNS Performance Testing Tool

[Status] Processing query data
[Status] Sending queries to 192.168.1.102:53

[Status]DNS Query Performance Testing Finish
[Result]Quries sent:		1000000
[Result]Quries completed:	978956
[Result]Complete percentage:	97.90

[Result]Elapsed time(s):	70.25900

[Result]Queries Per Second:	14233.05199

louishot avatar Mar 12 '23 01:03 louishot