Knowledge Base ISC Main Website Ask a Question/Contact ISC
Limiting the size of journal (.jnl) files with max-journal-size
Author: ISC Support Reference Number: AA-00374 Views: 7438 Created: 2011-07-21 01:40 Last Updated: 2018-08-07 11:08 0 Rating/ Voters

I am using BIND to serve information for dynamic zones.  After running for some time the journal files can get quite large.  Is there a way to limit their growth within BIND?

Yes, you can use the max-journal-size configuration option to specify a maximum size on a per-zone basis, e.g.:

max-journal-size size_spec;

"size_spec" is defined as one of the following:

A number, the word unlimited, or the word default.

An unlimited size_spec requests unlimited use, or the maximum available amount. A default size_spec uses the limit that was in force when the server was started.

number can optionally be followed by a scaling factor: K or k for kilobytes, M or m for megabytes, and G or g for gigabytes, which scale by 1024, 1024*1024, and 1024*1024*1024 respectively.

The value must be representable as a 64-bit unsigned integer (0 to 18446744073709551615, inclusive). Using unlimited is the best way to safely set a really large number.

Default Behavior

In versions of BIND older than 9.11, the default value for the "max-journal-size" parameter is "unlimited". The largest permitted value is 2 gigabytes. So the default ("unlimited") effectively means 2 gigabytes.  Therefore, unless you specify a maximum, default behavior is to allow growth without limit up to 2 gigabytes.

From BIND 9.12 and newer,  the maximum size of a zone journal file is twice the size of the zone's contents.  This can be overridden by setting "max-journal-size" to "unlimited" or to an explicit value up to 2G.

Note that any limit on the journal file sizes is guidance to the named process but is not a hard limit.  If the update rate is high or there are many zones to write out, this limit will be exceeded, but named will still try to keep within or close to the requested size.

More information on choosing a good value for max-journal-size can be found here:

Choosing the right value for max-journal-size

© 2001-2018 Internet Systems Consortium

For assistance with problems and questions for which you have not been able to find an answer in our Knowledge Base, we recommend searching our community mailing list archives and/or posting your question there (you will need to register there first for your posts to be accepted). The bind-users and the dhcp-users lists particularly have a long-standing and active membership.

ISC relies on the financial support of the community to fund the development of its open source software products. If you would like to support future product evolution and maintenance as well having peace of mind knowing that our team of experts are poised to provide you with individual technical assistance whenever you call upon them, then please consider our Professional Subscription Support services - details can be found on our main website.

  • There is no feedback for this article
Quick Jump Menu