Knowledge Base ISC Main Website Ask a Question/Contact ISC
Caution is strongly recommended if using the "dont-use-fsync" option
Author: ISC Support Reference Number: AA-01095 Views: 9920 Created: 2014-01-16 13:58 Last Updated: 2017-06-22 16:13 0 Rating/ Voters

Beginning with DHCP 4.3, ISC DHCP now supports an option to disable the use of fsync().

fsync() is a file-control primitive that instructs the operating system to synchronize pending writes to permanent storage (generally causing modified memory buffers that have not yet been written to be written to disk or similar storage.)

Because synchronous filesystem writes are one of the major performance constraints on dhcpd on most systems, eliminating fsync can have the effect of increasing the number of lease operations per second that can be handled by the server.  However, as documented in the dhcpd.conf man page and the README file for ISC DHCP, Internet Systems Consortium does not recommend the use of "dont-use-fsync yes;" in a server configuration because the relaxation of the requirement for synchronous write substantially increases the chance that the leases database will not be properly updated after lease operations are performed by the server.  If the server is interrupted when pending lease information has not yet been written to storage, the leases file may be left in an inconsistent or erroneous state, which may cause significant problems on restart.

The use of synchronous write operations remains the default behavior in DHCP 4.3 (equivalent to "don't use-fsync no;") and is the safest practice for server operation.

Even with fsync(), writes are not guaranteed

Please note that even when using synchronous writes, data may still not be successfully written to permanent storage.  fsync() causes the filesystem to send modified buffers to storage but storage systems may also perform caching and buffering -- the point at which a write operation is fully committed depends on the particulars of the storage system used and may be beyond the direct control of dhcpd

DHCP server operators looking for options to increase performance are advised to first try other mechanisms -- failover load balancing, delayed ack, etc -- supported by ISC DHCP. 

© 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