[DB-15464][Sizing Calc] buffer to choose higher vCPU instance type #2348
+71
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe the changes in this pull request
Pre-calculate the required number of cores and use it for selecting the appropriate instance type recommendation.
Current sizing calculator decides final recommendation based on the number of nodes required in later stage( which is calculated using the required number of cores in the first place). Hence, the better way is to use required number of cores.
example: Take into consideration following two sizing recommendation are suitable.
But, currently, in pickBestRecommendation, while recalculating the cores, it uses
nodes * vCPU
. Thus giving,8 * 37 ==> 296
16 * 19 ==> 304
Even though the required cores were 290 but because of reverse calc, it says 304 cores required for 16 vCPU setup and hence current sizing calculator suggest 8vCPU setup as it favours lesser cores(even though the number of required cores originally were higher).
This change directly considers required cores instead on recalculating it. Giving better recommendation.
Describe if there are any user-facing changes
NA
How was this pull request tested?
Manually and with CI jobs.
Does your PR have changes that can cause upgrade issues?