зеркало из https://github.com/Azure/azure-hpc.git
Ensure MaxTasksPerComputeNode is at least 2 when creating a single VM pool to prevent starvation.
This commit is contained in:
Родитель
6943ac1c58
Коммит
56c73afa1f
|
@ -1,6 +1,7 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
using Microsoft.Azure.Batch;
|
||||
|
@ -41,7 +42,11 @@ namespace Microsoft.Azure.Blast.Web.Controllers.Api
|
|||
poolSpec.VirtualMachineSize,
|
||||
_configuration.GetVirtualMachineConfiguration(),
|
||||
poolSpec.TargetDedicated);
|
||||
pool.MaxTasksPerComputeNode = _configuration.GetCoresForVirtualMachineSize(poolSpec.VirtualMachineSize);
|
||||
|
||||
// Need to always ensure a JM can run
|
||||
pool.MaxTasksPerComputeNode = Math.Max(2,
|
||||
_configuration.GetCoresForVirtualMachineSize(poolSpec.VirtualMachineSize));
|
||||
|
||||
pool.Commit();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче