From 4406f9b05dfc3aa5f232e01be94fb38950e3661f Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Wed, 13 Dec 2017 13:55:57 -0500 Subject: [master] delayed-ack is now compiled in by default Merges in rt42444. --- server/dhcp.c | 2 +- server/dhcpd.conf.5 | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'server') diff --git a/server/dhcp.c b/server/dhcp.c index bbe97b31..3396ebad 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -3574,7 +3574,7 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) } else { lease->cltt = cur_time; #if defined(DELAYED_ACK) && !defined(DHCP4o6) - if (enqueue) + if (enqueue && max_outstanding_acks != 0) delayed_ack_enqueue(lease); else #endif diff --git a/server/dhcpd.conf.5 b/server/dhcpd.conf.5 index 1ea87396..f2b6fa49 100644 --- a/server/dhcpd.conf.5 +++ b/server/dhcpd.conf.5 @@ -2267,26 +2267,28 @@ statements .B max-ack-delay \fImicroseconds\fR\fB;\fR .PP .I Count -should be an integer value from zero to 2^16-1, and defaults to 28. The -count represents how many DHCPv4 replies maximum will be queued pending -transmission until after a database commit event. If this number is -reached, a database commit event (commonly resulting in fsync() and -representing a performance penalty) will be made, and the reply packets -will be transmitted in a batch afterwards. This preserves the RFC2131 -direction that "stable storage" be updated prior to replying to clients. -Should the DHCPv4 sockets "go dry" (select() returns immediately with no -read sockets), the commit is made and any queued packets are transmitted. +should be an integer value from zero to 2^16-1 and defaults to 0, which means +that the feature is disabled. Otherwise, 28 may be a sensible starting point +for many configurations (SO_SNDBUF size / 576 bytes.) The count represents how +many DHCPv4 replies maximum will be queued pending transmission until after a +database commit event. If this number is reached, a database commit event +(commonly resulting in fsync() and representing a performance penalty) will be +made, and the reply packets will be transmitted in a batch afterwards. This +preserves the RFC2131 direction that "stable storage" be updated prior to +replying to clients. Should the DHCPv4 sockets "go dry" (select() returns +immediately with no read sockets), the commit is made and any queued packets +are transmitted. .PP Similarly, \fImicroseconds\fR indicates how many microseconds are permitted to pass inbetween queuing a packet pending an fsync, and performing the fsync. Valid values range from 0 to 2^32-1, and defaults to 250,000 (1/4 of a second). .PP -The delayed-ack feature is not compiled in by default, but must be enabled -at compile time with \'./configure --enable-delayed-ack\'. While we no -longer consider it experimental and we don't know of any issues with it, -in order to minimize problems with existing configuration files we have -left it disabled by default. +The delayed-ack feature is compiled in by default, but can be disabled +at compile time with \'./configure --disable-delayed-ack\'. Please note +that the delayed-ack feature is not currently compatible with support for +DHPCv4o6 (compiled out by default). You must compile with one or the +other but not both. .RE .PP The -- cgit v1.2.1