Build Parallelization - CI/CD用語集の定義
build parallelizationとは、独立した単位(test shard、パッケージのコンパイル、matrixのレグ)が同時に実行されるように、作業を複数のコアやマシンに分割することです。buildの最長の直列依存チェーンによって定まる限界まで、wall-clock timeを短縮します。
critical pathによる制限
workerを追加しても、critical pathが支配的になるまでしか役立ちません。あるステージが他のすべてより先に完了する必要があり、それに8分かかる場合、どれだけ並列化してもbuildは8分を下回りません。Amdahlの法則がこの上限を表します。より多くのrunnerを追加する前に、profilingで最長の依存チェーンを見つけて短縮しましょう。
CIでの形態
job内での並列化(make -j、並列test runner)と、job間での並列化(matrix build、runner間でのテストsharding)があります。job間の並列化には、レグを実際に同時実行するのに十分なrunner concurrencyが必要です。
関連ガイド
Critical Path - CI/CD Glossary DefinitionCritical Path: The critical path is the longest chain of dependent steps in a pipeline, the sequence that det…
Fan-Out Factor - CI/CD Glossary DefinitionFan-Out Factor: The fan-out factor is how many parallel downstream units a single upstream step spawns, for e…
Runner Concurrency - CI/CD Glossary DefinitionRunner Concurrency: Runner concurrency is the number of jobs that can execute in parallel across your runner…