See these two test here below.
TEST1: the dnsmasq.adblockFULL contains about 15.9K CNAME records. I'm generating the wanted dnsmasq.adblock file with an increased number of records. The test is essentially parsing the file and benchmarking them. As you can see there's something happening after 3000/4000 records as the time required is not linear.


root@sparrow:/tmp/etc# head -1200 ./dnsmasq.adblockFULL  > ./dnsmasq.adblock
root@sparrow:/tmp/etc# time dnsmasq --test
dnsmasq: syntax check OK.
real    0m 0.14s
user    0m 0.14s
sys     0m 0.00s
root@sparrow:/tmp/etc# head -3000 ./dnsmasq.adblockFULL  > ./dnsmasq.adblock
root@sparrow:/tmp/etc# time dnsmasq --test
dnsmasq: syntax check OK.
real    0m 1.01s
user    0m 1.00s
sys     0m 0.00s
root@sparrow:/tmp/etc# head -4000 ./dnsmasq.adblockFULL  > ./dnsmasq.adblock
root@sparrow:/tmp/etc# time dnsmasq --test
dnsmasq: syntax check OK.
real    0m 3.40s
user    0m 3.38s
sys     0m 0.01s
root@sparrow:/tmp/etc# head -5000 ./dnsmasq.adblockFULL  > ./dnsmasq.adblock
root@sparrow:/tmp/etc# time dnsmasq --test
dnsmasq: syntax check OK.
real    0m 7.48s
user    0m 7.46s
sys     0m 0.01s
root@sparrow:/tmp/etc# head -6000 ./dnsmasq.adblockFULL  > ./dnsmasq.adblock
root@sparrow:/tmp/etc# time dnsmasq --test
dnsmasq: syntax check OK.
real    0m 12.67s
user    0m 12.61s
sys     0m 0.02s
root@sparrow:/tmp/etc# head -7000 ./dnsmasq.adblockFULL  > ./dnsmasq.adblock
root@sparrow:/tmp/etc# time dnsmasq --test
dnsmasq: syntax check OK.
real    0m 19.10s
user    0m 19.05s
sys     0m 0.01s
root@sparrow:/tmp/etc# head -15000 ./dnsmasq.adblockFULL > ./dnsmasq.adblock
root@sparrow:/tmp/etc# time dnsmasq --test
dnsmasq: syntax check OK.
real    1m 43.89s
user    1m 43.57s
sys     0m 0.09s


TEST2: In this second test the adblock is defined using address= (so A records):

root@sparrow:/tmp/etc# wc -l /etc/dnsmasq.adblock
15966 /etc/dnsmasq.adblock
root@sparrow:/tmp/etc# time dnsmasq --test
dnsmasq: syntax check OK.
real    0m 0.14s
user    0m 0.13s
sys     0m 0.01s

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to