GitHub user ProjectMoon opened a pull request:
https://github.com/apache/cloudstack/pull/1948
Faster IP in subnet check
This change removes the conversion from IPNetwork to list in one of the
router scripts. This makes the router faster at processing static NAT rules,
which can prevent timeouts when attaching or detaching IPs.
With the `list` conversion, it has to potentially check a list of 65536 IP
strings multiple times. We assume that the comparison implemented in the
IPNetwork is far more efficient. We have seen speed-up from 218 seconds to
enable static NAT with 18 IPs on the router to 2 or 3 seconds by removing this
cast. This also fixes a potential bug where adding IPs to a router time out
because the scripts are taking too long. 218 seconds, for example, is beyond
the timeout on the KVM agent for script execution, and then all enableStaticNat
operations will fail.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/greenqloud/cloudstack pr-faster-static-nats
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1948.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1948
----
commit bd288ccc233775ce4bd5b67718c4e20611234d24
Author: Stefania <[email protected]>
Date: 2017-02-08T16:01:34Z
Faster ip in subnet check
This change removes an unnecessary conversion from IPNetwork
to list in one of the router scripts. This makes the router
faster at processing static NAT rules, which can prevent
timeouts when attaching or detaching IPs.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---