djbdns
[Top] [All Lists]

UPDATE dumpcache

To: dns@list.cr.yp.to
Subject: UPDATE dumpcache
From: Nikola Vladov <v20-qd-1182412614hiqmnqh@riemann.fmi.uni-sofia.bg>
Date: Tue, 22 May 2007 11:19:59 +0300
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-djbdns@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list dns@list.cr.yp.to
Mailing-list: contact dns-help@list.cr.yp.to; run by ezmlm
Hi!  I updated a litle my dumpcache patch.
http://riemann.fmi.uni-sofia.bg/docs/djbdns-dumpcache.html

It can dump and reload cache periodically (automatic cleans expired
entries).  By loading it calculetes (blowup) new RAM cachesize using 
  C = A*(len/100) + B      # default: A=200, B=32768, C - new cachesize

On this way the program finds the best cachesize.  One can change
parameters A and B using soft link
  cd /path/to/dnscache/dir
  cd root/dump
  ln -sf 180:200000 data.blowup        # sets A=180, B=200000

Three parameters: 'dump interval', A, B controls RAM cachesize.
RAM cachezize is always less than $CACHESIZE.  

The advantige of above is obvious.  If CACHESIZE=10mb and the programs
have 400K cache entreis it allocs only A*(400000/100) +B bytes RAM.
The RAM cachesize is calculated/updated for each reaload.  The
cachesize is updated with realloc (not alloc_re).

Russ if you want make a link on www.tinydns.org 
next to Florent Guillaume patch.

Nikola

<Prev in Thread] Current Thread [Next in Thread>
  • UPDATE dumpcache, Nikola Vladov <=