max-cache-size (was: no subject)

JINMEI Tatuya / 神明達哉 Jinmei_Tatuya at
Mon Jun 23 19:17:25 UTC 2008

At Mon, 23 Jun 2008 11:44:34 +0200,
Matus UHLAR - fantomas <uhlar at> wrote:

> > This is the expected behavior.  BIND 9.5 doesn't clean cache entries
> > unless they are required by queries.  It means the server main contain
> > expired entries in the cache, but as long as the total memory
> > footprint doesn't exceed the specified limit (i.e., max-cache-size) it
> > doesn't matter.
> so, with 9.5.* i just NEED to configure max-cache-size

In general, yes.

> or bind will eat as
> much of ram as possible, without expiring old entries?

It *could* be possible, but is not a realistic case.  First, there's a
default max-cache-size (32MB) as of 9.5.  So the memory footprint is
controlled by default.

Second, expired entries are still examined and purged when a new cache
entry is inserted.  This cleanup is not based on full search of the
cache DB, so it's still possible the memory footprint is still
(seemingly) growing uncontrollably, if you explicitly set
max-cache-size to unlimited and there are so many cache entries that
have very large TTLs.  In practice, however, I believe it should be
rare enough that we don't have to worry about it.

JINMEI, Tatuya
Internet Systems Consortium, Inc.

More information about the bind-users mailing list