att-comdev / promenade

This project has moved to OpenStack.
https://www.airshipit.org/
Apache License 2.0
11 stars 15 forks source link

Add threading to script generation #51

Closed craiganderson closed 6 years ago

craiganderson commented 6 years ago

./tools/simple-deployment.sh currently generates node scripts one at a time, and peg one CPU thread at 100% during generation. On a dual socket system with E5-2670, it takes approximately 1.5 hours to generate scripts for a 300 node environment, multiplied by the number of iterations required to get the right configs finalized.

Suggest adding a backlog item for parallelizing script generation and/or looking at other improvements to script generation times.

mark-burnett commented 6 years ago

Hey @craiganderson,

You're quite right that this is slow. A couple of relevant points:

  1. The time is mostly spent building and compressing the tarball that gets stuffed into the genesis.sh script. When/if we move to .deb packages, that tarball will become quite small, shortening the time required per generation.
  2. As soon as the PKICatalog work is done (see https://review.gerrithub.io/#/c/391476/), we can delete the KubernetesNode documents and stop generating each join script individually and simply rely on the API. This adds a "kind of free" parallelism, as we will already be able to serve multiple api requests to generate scripts.

I think there's no need to do plan more specific improvements here as both of these items are planned, but we should leave this issue open so we don't lose track of it.

mark-burnett commented 6 years ago

The PKICatalog is now merged and the joining node config is gone so script generation is no longer duplicated.

I don't see any need to add more parallelism at this point, as multiple scripts can already be generated in parallel via the API now.