ISC DHCP server config option dhcp-cache-threshold
The dhcp-cache-threshold statement
The dhcp-cache-threshold statement takes one integer parameter with allowed values between 0 and 100. The default value is 25 (25% of the lease time). This parameter expresses the percentage of the total lease time, measured from the beginning, during which a client's attempt to renew its lease will result in getting the already assigned lease, rather than an extended lease.
Clients that attempt renewal frequently can cause the server to update and write the database frequently resulting in a performance impact on the server. The dhcp-cache-threshold statement instructs the DHCP server to avoid updating leases too frequently thus avoiding this behavior. Instead the server assigns the same lease (i.e. reuses it) with no modifications except for CLTT (Client Last Trans- mission Time) which does not require disk operations. This feature applies to IPv4 only.
When an existing lease is matched to a renewing client, it will be reused if all of the following conditions are true:
- The dhcp-cache-threshold is larger than zero
- The current lease is active
- The percentage of the lease time that has elapsed is less than dhcp-cache-threshold
- The client information provided in the renewal does not alter any of the following:
- DNS information and DNS updates are enabled
- Billing class to which the lease is associated
- The host declaration associated with the lease
- The client id - this may happen if a client boots without a client id and then starts using one in subsequent requests.
Note that the lease can be reused if the options the client or relay agent sends are changed. These changes will not be recorded in the in-memory or on-disk databases until the client renews after the threshold time is reached.
The whole idea to cache too frequent requests is a good one even not so simple to implement.