... | ... | @@ -52,7 +52,19 @@ This should improve performance dramatically for high pool utilization scenarios |
|
|
|
|
|
### Keep free leases in a database
|
|
|
|
|
|
Current lease model assumes that we keep only the currently used leases in the database. SQL does not provide ability to query for non-existent data, so we can't ask for a free lease, can only ask if address X is available or not. If we change the model to keep available leases in db, we could simply ask give me the first available address". The downside is that technique would make the DB bigger, even when few (or none) addresses are allocated. The flip side is it should improve lease allocation dramatically.
|
|
|
The current lease model assumes that we keep only the currently used leases in the database. SQL does not provide ability to query for non-existent data, so we can't ask for a free lease, can only ask if address X is available or not. If we change the model to keep available leases in db, we could simply ask give me the first available address". The downside is that technique would make the DB bigger, even when few (or none) addresses are allocated. The flip side is it should improve lease allocation dramatically.
|
|
|
|
|
|
### Do not delete expired leases
|
|
|
|
|
|
Typically, allocation will only be a problem if a pool starts getting full. So an alternative strategy that may help is not to delete expired leases. Instead, when a pool's usage rises above a certain percentage, the allocation engine first searches for an expired lease. Only if there are no expired leases does it search through the pool for an address with no lease associated with it.
|
|
|
|
|
|
### Never use all addresses in a pool
|
|
|
|
|
|
The performance problem when searching for leases arises when a poll is nearly full. In these cases, a lot of addresses may need to be checked before a free address is found. This idea sets a maximum pool occupancy; if the pool usage exceeds this figure, the pool is skipped when searching for an available address. It of course has the downside that there will be wasted addresses.
|
|
|
|
|
|
### Warn administrators when a pool is getting full
|
|
|
|
|
|
Log a warning message when a pool starts getting full. ISC DHCP has this feature - see the documentation for the `log-threshold-high` and `log-threshold-low` parameters.
|
|
|
|
|
|
### Improve next address selection algorithm
|
|
|
|
... | ... | |