Synchronous Disk Writes and DHCP Performance Limitations
DHCP performance can be limited by disk I/O. Every lease issued by the DHCP server (every DHCP ACK) incurs a write to the
dhcpd.leases file. Messages sent to syslog are generally written at some point to a system log file. Modern I/O devices vary considerably in their performance characteristics but in general writes to a file system stored on a traditional hard disk are extremely slow compared to other operations performed by the server and may create a bottleneck which will affect your DHCP server's performance.
Here are some tips to help you speed performance on an I/O-bound server:
- Although every lease needs to be written to disk, you may be able to realize performance increases by changing the configuration parameters for"delayed-ack" and "max-ack-delay", causing the DHCP server to batch-write leases to disk, eliminating costly fsyncs.
- If you have the option to do so, moving the leases file to an SSD or other high-performance, low-latency storage system can dramatically speed lease writes and reduce blocking.
- If you are using DDNS in conjunction with DHCP, you may see better performance using ISC dhcpd 4.2 or later, as dynamic DNS updates are performed asynchronously starting in 4.2.
- Be aware that not all versions of syslog behave identically. In particular some (not all) Linux implementations (and possibly on other OS platforms as well) default to synchronous writes. If your default syslog is causing you problems there are many alternative open software versions available with which you can replace it.
If you are still experiencing I/O limitations after trying the previous suggestions, other approaches you can take to achieve greater performance include adjusting the lease time upwards to reduce the frequency of renewals and configuring parallel servers and dividing the address space served by them into separate pools.
dhcpd.conf file will tell the server to skip synchronizing writes after updating the lease database. ISC does not recommend using this option to increase performance unless you know what you are doing and have other measures in place to preserve lease file consistency -- use of this option increases the chance that if the server is suddenly interrupted the lease file will end in an inconsistent state.