Table of Contents

Pi-Hole - Benchmark

Extract the domains from the long-term database

sqlite3 /etc/pihole/pihole-FTL.db "SELECT domain FROM queries LIMIT 100000;" > domains.list

NOTE: This will generate a list file with up to 100,000 domains.

You can increase the upper limit of domains, however, we suggest starting from a small number of domains to get realistic results in a reasonable period of time.


Disable logging

sudo pihole logging off

NOTE: The long-term database can be disabled by setting in /etc/pihole/pihole-FTL.conf :

/etc/pihole/pihole-FTL.conf
DBFILE=

and running

sudo pihole restartdns

Increase DNS cache size

Set cache-size to a rather high value (maybe 25,000 - by guess roughly one-eighth to one-fourth number of the domains you extracted from the database earlier) in /etc/dnsmasq.d/01-pihole.conf :

/etc/dnsmasq.d/01-pihole.conf
cache-size=25000

and

sudo pihole restartdns

Query domains from the list

time dig -f domains.list +noall +answer > /dev/null

NOTE: This will show you how much time it takes to query the number of domains you extracted from the database.


References

https://docs.pi-hole.net/guides/benchmark/