Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize dynamic IP allocation algorithm by storing the last dynamically allocated IP #179

Merged
merged 2 commits into from
Feb 14, 2020

Conversation

Levovar
Copy link
Collaborator

@Levovar Levovar commented Feb 14, 2020

When an IP is dynamically allocated we save it into Pool/Pool6. Next time searching for the first free IP will start from the associated index, rather than from zero.
This should accelerate allocation time for huge allocation pools (4/8M).

Works with both V4/V6 subnets!

…ount

To optimize dynamic allocations we will save the IP we last allocated from the pool.
During the next dynamic allocation we will start looking from this index to save time, rather than always looping over from the beginning.
When an IP is dynamically allocated we save it into Pool/Pool6.
Next time searching for the first free IP will start from the associated index, rather than from zero.
This should accelerate allocation time for huge allocation pools (4/8M).
@Levovar Levovar merged commit aa3e798 into master Feb 14, 2020
@Levovar Levovar deleted the ipam_store_last_ip branch February 14, 2020 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant