Recommended setup with large cache memory

Attila Nagy bra at fsn.hu
Fri Sep 9 09:59:25 UTC 2005


Brad Knowles wrote:
>     No.  Experience has shown that cleaning more often results in each 
> cleaning session taking less time.
Interesting. But I don't want to do regular cleaning. It is perfectly 
right for me to fill up the available space and if it's full, drop 
entries based on anything (random, least used, expiration time, etc).

It seems that it works, at least the memory usage doesn't grow besides a 
limit and the cache still operates.

BTW, FreeBSD's named has an out of memory patch. Could be that this 
causes this behaviour? Does anybody know what should happen if I set 
cleaning-interval to 0 and set max-cache-size to a given number and fill 
up the cache?

I can think two modes:
- dropping the old, unused, etc entried dynamically, to make space for 
the new ones
- the cache memory remains allocated. If an entry has its TTL expired, 
the server won't serve it from that, but leaves there, so after some 
time, the cache will use the given amount of memory, but there will be 
no caching

If the first is the case, I don't know why should I use 
cleaning-interval. If the second, I guess even a very simple random drop 
  would be better.

>     You can't gauge the amount of expired entries based on the query 
> load.  You could only know that based on actually stepping through the 
> cached data and looking to see what is there.  My experience is that the 
> number of expired entries is more closely related to the total number of 
> entries overall, than anything to do with query load by the hour.
Can be.

>     Which is another reason why Kevin's request is a good one -- put 
> load-balancing switches in front of the caching servers, then take the 
> machines out of the switch pool when you go to do the cleaning, and put 
> them back in the pool when you're done.
I guess it would be much better to leave cleaning out of the picture. :)
BTW, I have a load balancer in front of the caches, but it's still 
annoying that I need to do a regular cleaning.

Thanks,
-- 
Attila Nagy                                   e-mail: Attila.Nagy at fsn.hu
Adopt a directory on our free software   phone @work: +361 371 3536
server! http://www.fsn.hu/?f=brick             cell.: +3630 306 6758



More information about the bind-users mailing list