From 4d173174f0632beb4801746939daeaffe3061c4d Mon Sep 17 00:00:00 2001 From: Matt Galbraith Date: Wed, 19 May 2021 15:28:37 -0700 Subject: [PATCH] Reduce parallelism of publishing upload clients (#7414) See writeup in https://github.com/dotnet/core-eng/issues/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. --- .../src/PublishArtifactsInManifestBase.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs index dfa8dd31a45..c336a196ed9 100644 --- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs +++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs @@ -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; /// /// 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. /// public int MaxClients { get { return UseStreamingPublishing ? StreamingPublishingMaxClients : NonStreamingPublishingMaxClients; } }