Merged PR 663189: Change maxProcMultiplier to 0.9 by default

Added details here: https://microsoft.sharepoint.com/teams/toolsforeng/_layouts/OneNote.aspx?id=%2Fteams%2Ftoolsforeng%2FOne%20Note%2FToolsForSoftwareEngineers%2FBuild%20Tools%2FBuildXL&wd=target%28BuildXL.one%7C10FACD4F-4E15-4FE3-96BA-446F3FE6454E%2FA%5C%2FB%20testing%20for%20performance%7C6D58DC8F-DF8F-49A5-9E70-07DCCA89756B%2F%29

**/abTesting:maxProcNormal=\"/maxProcMultiplier:1\"
/abTesting:maxProcLow=\"/maxProcMultiplier:0.9\"
 /abTesting:maxProcLowest=\"/maxProcMultiplier:0.75\"**

![Screenshot 2022-05-23 200211.png](https://mseng.visualstudio.com/9ed2c125-1cd5-4a17-886b-9d267f3a5fab/_apis/git/repositories/50d331c7-ea65-45eb-833f-0303c6c2387e/pullRequests/663189/attachments/Screenshot%202022-05-23%20200211.png)

![Screenshot 2022-05-23 201930.png](https://mseng.visualstudio.com/9ed2c125-1cd5-4a17-886b-9d267f3a5fab/_apis/git/repositories/50d331c7-ea65-45eb-833f-0303c6c2387e/pullRequests/663189/attachments/Screenshot%202022-05-23%20201930.png)

let tonum = (arg0:string) { case(isempty(arg0), 0, tolong(arg0)) };
let tomin = (arg0:string) { myround(tonum(arg0)/60000.0) };
let tohour = (arg0:string) { myround(tonum(arg0)/3600000.0) };
let topercent = (arg0:double, arg1:double) { myround(100.0 * arg0 / arg1) };
database("CloudBuildProd").BuildPerfInfo(startDate=ago(30d), endDate=now(), msrReportable=1, customer="Office")
| where NumProcessHits + NumProcessMisses > 0
| join (
    dominoinvocation
        | where Environment contains "Enlist"
        | parse Environment with * "ABTesting=" AbTestingGroup ";" *
        | where toint(MachineInfo_ProcessorCount) == 80
    ) on $left.BuildId == $right.RelatedSessionId, $left.BuildControllerMachineName == $right.MachineName
| summarize
    NumBuilds = count(),
    InternalError=countif(ReturnCode contains "InternalError"),
    TotalExeDuration_avg=myround(avg(ExecuteProcess_Total)),
    Phase_BuildXL_avg=myround(avg(Phase_BuildXL)),
    Phase_BuildXL_p50=myround(percentile(Phase_BuildXL, 50)),
    Success_percent=topercent(countif(ReturnCode == "Success"), count()),
    NumBuildsMissingWorker_percent=topercent(countif(NumWorkerMissing > 0), count()),
    NumCacheHitRate_avg=myround(avg(NumCacheHitRate)),
    TotalMachineHours=round(sum(NumMachineHours)),
    NumWorkers_avg=myround(avg(NumWorkers)),
    TotalMaterializationHour_avg=round(avg(TotalMaterializationHour)),
    TotalMaterializeInputHour_avg=round(avg(TotalMaterializeInputHour)),
    TotalMaterializedInputGb_avg=myround(avg(TotalMaterializedInputGb)),
    TotalBuildXLMachineHours=myround(sum(NumActualBuildXLHours)),
    BuildXLMachineHours_avg=myround(avg(NumActualBuildXLHours)),
by AbTestingGroup

---------
database("CloudBuildProd").BuildInfo
| where BuildEngineType == "OfficeDomino"
| where StartTime >= ago(10d)
| join (
    dominoinvocation
        | where Environment contains "Enlist"
        | parse Environment with * "ABTesting=" AbTestingGroup ";" *
    ) on $left.BuildId == $right.RelatedSessionId, $left.BuildControllerMachi...
This commit is contained in:
Semih Okur 2022-05-27 20:21:45 +00:00
Родитель 6b7e04b7cc
Коммит ccd69888de
3 изменённых файлов: 60 добавлений и 5 удалений

Просмотреть файл

@ -0,0 +1,54 @@
<h1>Lower concurrency experiment</h1>
March 2022
Office builds on gen5 compute (processor count:80)
normalConcurrency: /maxMaterialize:100 /maxCacheLookup:160
lowerConcurrency: /maxMaterialize:80 /maxMaterialize:80
|AbTestingGroup|NumBuilds|InternalError|NumCacheHitRate_avg|TotalExeDuration_avg|Phase_Build_avg|Phase_BuildXL_p50|Phase_BuildXL_p95|CriticalPath_CacheLookup_avg|CriticalPath_MaterializeInputs_avg|
|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|
|lowerConcurrency|56,354|1,345|89.5|19,769.2|58.2|32.7|168.2|2.7|2.2|
|normalConcurrency|55,792|1,267|89.5|20,568.3|59.1|33.1|172.4|3.3|2.3|
<h1>MergeIOCache experiment</h1>
April 2022
Office builds on gen5 compute (processor count:80)
normal=\"/maxMaterialize:80 /maxCacheLookup:80\"
mergeIOCache=\"/maxMaterialize:80 /maxCacheLookup:80 /orchestratorCacheLookupMultiplier:1 /parameter:BuildXLMergeIOCacheLookupDispatcher=1\""
|AbTestingGroup|NumBuilds|InternalError|NumCacheHitRate_avg|TotalExeDuration_avg|Phase_Build_avg|Phase_BuildXL_p50|Phase_BuildXL_p95|CriticalPath_Start_avg|CriticalPath_CacheLookup_avg|CriticalPath_MaterializeInputs_avg|CriticalPath_TotalOrchestratorQueue_avg|
|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|
|mergeIOCache|23,218|268|90.2|17,071.1|58.7|33.2|182.5|0.1|3|2.3|11.8|
|normal|22,541|237|89.9|17,282.7|56.3|32.1|161.8|0.1|3|2.2|9.5|
<h1>MaxIO experiment</h1>
April 2022
Office builds on gen5 compute (processor count:80)
/abTesting:maxIO10=\"/maxIO:10\"
/abTesting:maxIO20=\"/maxIO:20\"
|AbTestingGroup|NumBuilds|InternalError|NumCacheHitRate_avg|TotalExeDuration_avg|Phase_Build_avg|Phase_BuildXL_p50|Phase_BuildXL_p95|CriticalPath_Start_avg|CriticalPath_CacheLookup_avg|CriticalPath_MaterializeInputs_avg|CriticalPath_TotalOrchestratorQueue_avg|
|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|
|maxIO20|18,614|307|88.3|21,871.7|54.9|32.4|161|0.1|3.4|2.7|10.3|
|maxIO10|18,407|337|88.5|20,421.7|54.5|31.9|162.2|0.1|3.4|2.6|9.8|
<h1>maxProcMultiplier experiment</h1>
May 23, 2022
All Office builds
maxProcNormal=\"/maxProcMultiplier:1\"
maxProcLow=\"/maxProcMultiplier:0.9\"
maxProcLowest=\"/maxProcMultiplier:0.75\"
|AbTestingGroup|NumBuilds|InternalError|NumCacheHitRate_avg|TotalExeDuration_avg|Phase_Build_avg|Phase_BuildXL_p50|Phase_BuildXL_p95|CriticalPath_Start_avg|CriticalPath_CacheLookup_avg|CriticalPath_MaterializeInputs_avg|CriticalPath_TotalOrchestratorQueue_avg|
|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|
|maxIO20|18,614|307|88.3|21,871.7|54.9|32.4|161|0.1|3.4|2.7|10.3|
|maxIO10|18,407|337|88.5|20,421.7|54.5|31.9|162.2|0.1|3.4|2.6|9.8|

Просмотреть файл

@ -33,17 +33,18 @@ namespace BuildXL.Utilities.Configuration.Mutable
// In the past, we decided to use 1.25 * logicalCores to determine the concurrency for the process pips.
// However, at that time, cachelookup, materialization, and other non-execute steps were all taking a slot from that.
// As each major step runs in its own queue with a separate concurrency limit, we decided to revise using 1.25 multiplier.
// After doing A/B testing on thousands of builds, using 1 instead of 1.25 multiplier decreases the load on the machine and improves the perf.
MaxProcesses = Environment.ProcessorCount;
// After doing A/B testing on thousands of builds, using 0.9 instead of 1.25 multiplier decreases the load on the machine and improves the perf:
// https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/SchedulerPerfExperiments.md
MaxProcesses = (int)Math.Ceiling(0.9 * Environment.ProcessorCount);
// Based on the A/B testing results, the concurrency limit for IO dispatcher did not help after 10.
// https://microsoft.sharepoint.com/teams/toolsforeng/_layouts/15/Doc.aspx?sourcedoc={4e5aff6a-31c7-4054-a746-e590b865c585}&action=edit&wd=target%28Build%20Tools%2FBuildXL%2FBuildXL.one%7C10facd4f-4e15-4fe3-96ba-446f3fe6454e%2FA%5C%2FB%20testing%20for%20performance%7C6d58dc8f-df8f-49a5-9e70-07dcca89756b%2F%29&wdorigin=703
// https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/SchedulerPerfExperiments.md
MaxIO = Math.Min(10, Math.Max(1, Environment.ProcessorCount / 4));
MaxLightProcesses = 1000;
// We decide the concurrency levels based on A/B testing results.
// https://microsoft.sharepoint.com/teams/toolsforeng/_layouts/15/Doc.aspx?sourcedoc={4e5aff6a-31c7-4054-a746-e590b865c585}&action=edit&wd=target%28Build%20Tools%2FBuildXL%2FBuildXL.one%7C10facd4f-4e15-4fe3-96ba-446f3fe6454e%2FA%5C%2FB%20testing%20for%20performance%7C6d58dc8f-df8f-49a5-9e70-07dcca89756b%2F%29&wdorigin=703
// https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/SchedulerPerfExperiments.md
MaxCacheLookup = Environment.ProcessorCount;
MaxMaterialize = Environment.ProcessorCount;
MaxSealDirs = Environment.ProcessorCount;

Просмотреть файл

@ -19,7 +19,7 @@ BuildXL has a command-line interface. There are currently no plans to integrate
See the `Examples/` folder for basic project examples.
## Documentation
The BuildXL documentation landing page is [here](Documentation/INDEX.md) and look at [the develolper guide](Documentation/Wiki/DeveloperGuide.md) in order to understand how to build and use BuildXL.
The BuildXL documentation landing page is [here](Documentation/INDEX.md) and look at [the developer guide](Documentation/Wiki/DeveloperGuide.md) in order to understand how to build and use BuildXL.
## Build Status - Azure DevOps Pipelines
[![Build status](https://dev.azure.com/mseng/Domino/_apis/build/status/8196?branchName=master)](https://dev.azure.com/mseng/Domino/_build/latest?definitionId=8196)