DEV Community

Tony Metzidis
Tony Metzidis

Posted on

Benchmarking Pihole : Pi Zero vs Pi 3b+

From Pi Hole Discourse

Here's a benchmark comparing pi-hole running on a Pi Zero (with USB ethernet) vs a Pi 3b+.

tl;dr There was negligible performance difference for blocked domains, but a measurable difference in mean for forwarded + cacheable domains. Although the Pi 3b+ has a 11ms better mean response time for forwarded queries, the P95 for pi zero is better in both blocked and forwarded queries.

I would recommend using the Pi Zero.


Prior to the experiment, I assumed that the pi zero would be 30-50% slower in all cases, and that stddev would be larger (worse & more erratic latencies).

Hardware & Setup

Router: TP Link Archer C9
PI 3b+ : connected via 100mb ethernet into router, 32gb sandisk microsd card. Raspbian Desktop
Pi Zero-W : connected via usb ethernet adapter, 100mb ethernet into router, 8gb class-4 sd card. Raspbian Lite


I used dnstrace -- a go dns benchmark.
Each test did 1000 queries with 10 concurrency ( go run dnstrace.go -c 10 -s -n 100 )


full histogram and results can be found here


pi 3b+

 min:        16.252928ms
     mean:       38.372412ms
     [+/-sd]:    23.097544ms
     max:        385.875967ms

pi zero

DNS timings, 1000 datapoints
     min:        19.922944ms
     mean:       40.043544ms
     [+/-sd]:    7.762346ms
     max:        71.303167ms


pi 3b+

DNS timings, 997 datapoints
     min:        13.1072ms
     mean:       19.527493ms
     [+/-sd]:    12.101107ms
     max:        142.606335ms

pi zero

DNS timings, 999 datapoints
     min:        16.252928ms
     mean:       30.097752ms
     [+/-sd]:    5.005948ms
     max:        88.080383ms

Summary and Findings

I believe the zero is an adequate replacement for the pi 3b+ . Moreover, I was impressed and shocked that stddev on the pi zero was lower than the 3b+. So despite having worse mean forwarding response times, the P95 for pi zero is better in both blocked and forwarded queries.

⭐ I'll leave these two devices online for a bit let me know if you'd like any further testing done. ⭐

Discussion (2)

rockaut profile image
Markus Fischbacher

Why haven't you used Raspbian Lite on 3B too? I would say that would make a difference.

tonymet profile image
Tony Metzidis Author

Just testing the hardware I have handy. If you have one can you try running the benchmark I shared in the gist?