Sam Trenholme's webpage
Support this website

Deadwood update

 

November 29 2011

Better timestamps

I mentioned in a recent blog entry my plans to implement sub-second finer timestamps for Deadwood's time stamps. This uses the POSIX-compliant clock_gettime() call in Linux and the GetSystemTimeAsFileTime() call in Windows. For systems without clock_gettime() (cough Mac OS X cough), it is possible to use the one-second resolution time() by defining FALLBACK_TIME before compiling Deadwood, like this:
cd src/ ; export FLAGS='-O3 -DFALLBACK_TIME' ; make
The advantage of using finer timestamps is that it allows me to safely lower the default timeout to only one second, which will speed up resolution in cases where a DNS server is not responding.

Since Deadwood has already set aside the lower eight bits of the timestamp for sub-second timestamps, I was able to implement this without changing Deadwood's cache binary format.

This change concludes the adding of features to speed up Deadwood that Nicholas Bamber very generously sponsored. I still plan on fixing bugs with the newly added features, as well as fixing other bugs in Deadwood and MaraDNS.

Deadwood is faster

One issue earlier releases of Deadwood had is that they were sometimes rather slow in resolving some domain names. I've done a lot of work this last year improving handling of the corner cases that slowed resolution down; fixes such as the "truncation hack", the "urbandictionary hack", as well as many other bug fixes have greatly reduced the chance of an unusual DNS packet delaying Deadwood's resolution of a host.

Along with the 3.1 improvements in handling cached incomplete CNAMEs and the improved Deadwood timestamps, the code is now faster.

My own "dog food" testing of the latest Deadwood snapshot feels more snappy than older 3.0 releases of Deadwood. Now that Deadwood appears to be able to resolve domains correctly, I have been able to concentrate a little on speeding things up.

Getting it

The latest development snapshot can be downloaded here:
http://www.maradns.org/deadwood/snap/

To post a comment about an entry, send me an email and I may or may not post your comment (with or without editing)