neoave / mrack

Multicloud use-case based multihost async provisioner for CIs and testing during development
Apache License 2.0
11 stars 14 forks source link

feat: OpenStack: increase polling time based on number of hosts #82

Closed pvoborni closed 3 years ago

pvoborni commented 3 years ago

Increase polling times so that Mrack doesn't poll very often to not overload the server when a lot of hosts is provisioned.

Current setting should be approx:

hosts   init_wait   poll_time   After 10mins    After 15mins
    1       15.65        7.22          48.77           69.55
    3       16.95        7.66          46.82           66.41
    7       19.55        8.54          43.67           61.23
   10       21.50        9.20          41.81           58.11
   30       34.50       13.60          35.66           46.69
  100       80.00       29.00          39.34           44.52
  200      145.00       51.00          56.88           59.82

Where "After 10/15mins" is poll_time after the time, but it is not a precise value (did not want to spend time on calculating it).

pvoborni commented 3 years ago

This is basically bringing back original behavior of OpenStack provider: bb9bf58#diff-8e8caf518ae0969d59fdaa947bbc733d0331a2f9a9c4a85d7cb7d9ebbd6a7b30R350-R370 which was (in my opinion incorrectly) removed in refactoring: b0254b2#diff-bd392f803f40b20782cd5ade230c5c9ba08f4752d895834cf4b5279ae8e242ceL429-L450

pvoborni commented 3 years ago

Btw, this is really needed. Especially for larger deployments. With previous behavior provisioning of 50 machines means polling, at beginning, every 7/50s so each 0.14s. How fast is the provisioning really depends on OpenStack deployment. If we assume e.g. 3 host per 30s then the whole provisioning can take e.g. 500s and here asking every 7s doesn't make sense.

pvoborni commented 3 years ago

In the last revision, I've also added randomization to the initial wait so that Mrack won't poll the server for all remaining at the same time.