Skip to content

Commit

Permalink
Reduce parallelism of publishing upload clients (#7414)
Browse files Browse the repository at this point in the history
See writeup in dotnet/core-eng#13098.  Hosted agents are running < 50% of the RAM they had recently.  I am endeavoring to get this back but it won't be fast if at all.
  • Loading branch information
MattGal authored May 19, 2021
1 parent 30a24ac commit 4d17317
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,17 @@ public abstract class PublishArtifactsInManifestBase : Microsoft.Build.Utilities
[Required]
public string NugetPath { get; set; }

private const int StreamingPublishingMaxClients = 20;
private const int NonStreamingPublishingMaxClients = 16;
private const int StreamingPublishingMaxClients = 16;
private const int NonStreamingPublishingMaxClients = 12;

/// <summary>
/// Maximum number of parallel uploads for the upload tasks.
/// For streaming publishing, 20 is used as the most optimal.
/// For non-streaming publishing, 16 is used (there are multiple sets of 16-parallel uploads)
///
/// NOTE: Due to the desire to run on hosted agents and drastic memory changes in these VMs
/// (see https://github.com/dotnet/core-eng/issues/13098 for details) these numbers are
/// currently reduced below optimal to prevent OOM.
/// </summary>
public int MaxClients { get { return UseStreamingPublishing ? StreamingPublishingMaxClients : NonStreamingPublishingMaxClients; } }

Expand Down

0 comments on commit 4d17317

Please sign in to comment.