spf-discuss
[Top] [All Lists]

Benchmarks ov M:S:Q vs libspf vs libspf-alt

2004-03-27 07:49:19

Just for giggles, benchmarked the various SPF implementations that I
have available.

I actually created this benchmark over a month ago,
but I hadn't run it recently.  The benchmark basically just feeding a
very large number of queries into the spfquery program via the "-file"
option.  This means that the perl pays for the startup costs only once
instead of once-per-query.  The list queries was created by using the
(then current) regression tests, copied many times until there were
over 4,000 queries.


So, here are the results:


(wayne(_at_)footbone) $ wc test_benchmark_spfquery.txt 
  4380  13140 281280 test_benchmark_spfquery.txt

*** libspf-alt v0.3
real    0m1.081s
user    0m0.330s
sys     0m0.090s


*** perl M:S:Q 1.996
real    0m6.884s    6.37 times slower than libspf-alt
user    0m6.250s   19.94 times slower than libspf-alt
sys     0m0.170s    1.89 times slower than libspf-alt


*** libspf v0.24
real    0m5.217s    4.83 times slower than libspf-alt
user    0m2.310s    7.00 times slower than libspf-alt
sys     0m2.700s   30.00 times slower than libspf-alt


*** libspf-alt v0.2 without the caching DNS layer
real    0m5.675s    5.25 times slower than with the cache
user    0m0.690s    2.09 times slower than with the cache
sys     0m0.670s    7.44 times slower than with the cache


Note that, due to known bugs in libspf versions 0.23 and 0.24, it
appears that only the first 100 or so SPF checks work.  After 100
queries, libspf starts to return "unknown" for everything.


So, anyway, libspf-alt is probably the fastest SPF implementation,
even if you decide not to use the DNS caching layer.  The DNS caching
layer makes things *MUCH* faster.


The tests were all run on my laptop.  It is a 900MHz Pentium3 running
Debian Linux system.  There *IS* a local caching name server
(bind9.2.3) and the tests were run when *all* queries that bind will
cache were in the local bind cache.


Like all synthetic benchmarks, you need to take these results with a
large grain of salt.  Real world results will likely be different.
Still, they give an interesting perspective.



-wayne




<Prev in Thread] Current Thread [Next in Thread>
  • Benchmarks ov M:S:Q vs libspf vs libspf-alt, wayne <=