Hi Anand, On 25/08/16 09:11, Anand Buddhdev wrote:> Hi Wouter, > > I just noticed that in the next release of NSD, there will be a > build-time option called "disable-radix-tree". The accompanying comment > says that it uses a red-black tree instead, and lowers memory usage. > However, this isn't a default option, so my assumption is that this has > other negative side effects, but there's no mention of such effects. > > Could you please tell us more about this? Are lookups in red-black trees > slower? Do they use more CPU? Is there any other reason why you don't > use a red-black tree by default?A small speed difference. It is a memory-for-speed tradeoff, and the benefits are about 10% either way. If memory is an obstacle; 10% speed hopefully isn't. Otherwise, upgrade the machine, I guess... Best regards, Wouter> > Regards, > Anand > _______________________________________________ > nsd-users mailing list > nsd-users at NLnetLabs.nl > https://open.nlnetlabs.nl/mailman/listinfo/nsd-users >-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://lists.nlnetlabs.nl/pipermail/nsd-users/attachments/20160825/6a606b7b/attachment.bin>
> On 25 Aug 2016, at 17:31, W.C.A. Wijngaards <wouter at nlnetlabs.nl> wrote: > > Hi Anand, > > On 25/08/16 09:11, Anand Buddhdev wrote: >> Hi Wouter, >> >> I just noticed that in the next release of NSD, there will be a >> build-time option called "disable-radix-tree". The accompanying comment >> says that it uses a red-black tree instead, and lowers memory usage. >> However, this isn't a default option, so my assumption is that this has >> other negative side effects, but there's no mention of such effects. >> >> Could you please tell us more about this? Are lookups in red-black trees >> slower? Do they use more CPU? Is there any other reason why you don't >> use a red-black tree by default? > > A small speed difference. It is a memory-for-speed tradeoff, and the > benefits are about 10% either way. If memory is an obstacle; 10% speed > hopefully isn't. Otherwise, upgrade the machine, I guess...are you using red black trees to do lookups of ip addresses?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 25/08/16 09:31, W.C.A. Wijngaards wrote: Hi Wouter,>> Could you please tell us more about this? Are lookups in >> red-black trees slower? Do they use more CPU? Is there any other >> reason why you don't use a red-black tree by default? > > A small speed difference. It is a memory-for-speed tradeoff, and > the benefits are about 10% either way. If memory is an obstacle; > 10% speed hopefully isn't. Otherwise, upgrade the machine, I > guess...Thanks for this explanation. We have enough memory on our servers, so I don't foresee the need to disable the radix tree. Do you mind appending "but uses some more CPU" to the help string of the disable-radix-tree option? This will make the consequences of this option completely clear. Regards, Anand -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJXvqkFAAoJEBXgoyUMySoFnZgP/2hymb340jgn9zC0dutCTfID nhtqQ/cKiAcEsyBswBqxTa7eWJtpqbzXhdfBZHXlDg8RwchOjyzStsTd19o3OGU4 Kx8SB0QCT7V1rQ6fcNJuQ+rINYwhv9jXq0pVuHRY9NfC4CYNumok/IMcnQA6elQR OqkFCMph6xbcbtEM7rmzHPO3AK5LZz3BRQ/9IpD09p9uOmLWzaUwqB7Qk4K5Hp1W cYPqCPA2sYaHww8GT//qM7CqLMovm1EnS+NjrhLD+O4mvJ5SWuuyhdU/cJ+dpz6z WAxMQ/7NkQqMNLV7xAcTjbHlRIUhq+fDJjW5zKPn8vPIj/MhXKS4xFLx8g8VXcBM bVoFNpki98c1X1GZhAuD5AMpBvoHYBxs0fOG6wFcDye9zzmBjQhu8/Fp9vZPEn2v qzypkMAxeKdbsNiS7pWErFRkLmh+5oiwGeBDpscgZizikkXP50mTU0l6AKQHe/mv FYC7SoGC/fiKaVhhp6yVpgoSUp2vpBptorzOQHbVgFqy2kxNwsweUCSaio+GJqMN dVNSs0/JKcGrs2AQyYGUpXJVsC1Tzg8vjhhx/4LF2VR0hkFxedtCFX9X7zSOgMxU wJmj32Pn8LoQ52iPrJtXywxQ6uQJadpcAP6FFF576P+xZWuP7/zj7Yb7jykqv1ij c0LYV71/EC/YCpVUHgYk =Ci+g -----END PGP SIGNATURE-----