Skip to content

Commit 8762345

Browse files
lilinvictormsJnHs
authored andcommitted
Add/update articles for TaskSlotsPerNode
1 parent 80e1191 commit 8762345

19 files changed

+408
-191
lines changed

articles/batch/TOC.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
href: high-availability-disaster-recovery.md
8484
- name: Task runtime environment variables
8585
href: batch-compute-node-environment-variables.md
86-
- name: How-to guides
86+
- name: How-to guides
8787
items:
8888
- name: Manage Batch accounts
8989
items:
@@ -110,9 +110,9 @@
110110
- name: Using certificates with Batch
111111
href: batch-certificates.md
112112
- name: Copy files and applications to pool nodes
113-
items:
113+
items:
114114
- name: Copying applications and data to pool nodes
115-
href: batch-applications-to-pool-nodes.md
115+
href: batch-applications-to-pool-nodes.md
116116
- name: Using application packages
117117
href: batch-application-packages.md
118118
- name: Create resource files
@@ -152,7 +152,7 @@
152152
- name: Create a CI/CD pipeline for Batch
153153
href: batch-ci-cd.md
154154
- name: Manage jobs and tasks
155-
items:
155+
items:
156156
- name: Job preparation and completion tasks
157157
href: batch-job-prep-release.md
158158
- name: Concurrent node tasks
@@ -192,7 +192,7 @@
192192
- name: Use Azure CLI
193193
href: batch-cli-get-started.md
194194
items:
195-
- name: Use Batch CLI templates
195+
- name: Use Batch CLI templates
196196
href: batch-cli-templates.md
197197
- name: Use Batch Node.js SDK
198198
href: batch-nodejs-get-started.md
@@ -219,7 +219,7 @@
219219
- name: Storage and data movement
220220
href: batch-rendering-storage-data-movement.md
221221
- name: Rendering architectures
222-
href: batch-rendering-architectures.md
222+
href: batch-rendering-architectures.md
223223
- name: Data processing with Batch and Data Factory
224224
href: ../data-factory/transform-data-using-dotnet-custom-activity.md?toc=%2fazure%2fbatch%2ftoc.json
225225
- name: Reference
@@ -257,12 +257,16 @@
257257
href: batch-pool-resize-start-event.md
258258
- name: Pool resize complete event
259259
href: batch-pool-resize-complete-event.md
260+
- name: Pool autoscale event
261+
href: batch-pool-autoscale-event.md
260262
- name: Task start event
261263
href: batch-task-start-event.md
262264
- name: Task complete event
263265
href: batch-task-complete-event.md
264266
- name: Task fail event
265267
href: batch-task-fail-event.md
268+
- name: Task schedule fail event
269+
href: batch-task-schedule-fail-event.md
266270
- name: Azure Policy built-ins
267271
displayName: samples, policies, definitions
268272
href: ./policy-reference.md

articles/batch/batch-analytics.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Azure Batch Analytics
33
description: The topics in Batch Analytics contain reference information for the events and alerts available for Batch service resources.
44
ms.topic: reference
5-
ms.date: 04/20/2017
5+
ms.date: 09/20/2020
66
---
77

88
# Batch Analytics
@@ -20,6 +20,8 @@ The Azure Batch service emits the following diagnostic log events during the lif
2020
* [Pool delete complete](batch-pool-delete-complete-event.md)
2121
* [Pool resize start](batch-pool-resize-start-event.md)
2222
* [Pool resize complete](batch-pool-resize-complete-event.md)
23+
* [Pool autoscale](batch-pool-autoscale-event.md)
2324
* [Task start](batch-task-start-event.md)
2425
* [Task complete](batch-task-complete-event.md)
2526
* [Task fail](batch-task-fail-event.md)
27+
* [Task schedule fail](batch-task-schedule-fail-event.md)

articles/batch/batch-automatic-scaling.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,24 @@ Result:
643643
Error:
644644
```
645645

646+
## Get autoscale run history using pool autoscale events
647+
You can also check automatic scaling history by querying [PoolAutoScaleEvent](batch-pool-autoscale-event.md). This event is emitted by Batch Service to record each occurrence of autoscale formula evaluation and execution, which can be helpful to troubleshoot potential issues.
648+
649+
Sample event for PoolAutoScaleEvent:
650+
```json
651+
{
652+
"id": "poolId",
653+
"timestamp": "2020-09-21T23:41:36.750Z",
654+
"formula": "...",
655+
"results": "$TargetDedicatedNodes=10;$NodeDeallocationOption=requeue;$curTime=2016-10-14T18:36:43.282Z;$isWeekday=1;$isWorkingWeekdayHour=0;$workHours=0",
656+
"error": {
657+
"code": "",
658+
"message": "",
659+
"values": []
660+
}
661+
}
662+
```
663+
646664
## Example autoscale formulas
647665

648666
Let's look at a few formulas that show different ways to adjust the amount of compute resources in a pool.
@@ -686,15 +704,15 @@ $NodeDeallocationOption = taskcompletion;
686704

687705
### Example 3: Accounting for parallel tasks
688706

689-
This C# example adjusts the pool size based on the number of tasks. This formula also takes into account the [MaxTasksPerComputeNode](/dotnet/api/microsoft.azure.batch.cloudpool.maxtaskspercomputenode) value that has been set for the pool. This approach is useful in situations where [parallel task execution](batch-parallel-node-tasks.md) has been enabled on your pool.
707+
This C# example adjusts the pool size based on the number of tasks. This formula also takes into account the [TaskSlotsPerNode](/dotnet/api/microsoft.azure.batch.cloudpool.taskslotspernode) value that has been set for the pool. This approach is useful in situations where [parallel task execution](batch-parallel-node-tasks.md) has been enabled on your pool.
690708

691709
```csharp
692710
// Determine whether 70 percent of the samples have been recorded in the past
693711
// 15 minutes; if not, use last sample
694712
$samples = $ActiveTasks.GetSamplePercent(TimeInterval_Minute * 15);
695713
$tasks = $samples < 70 ? max(0,$ActiveTasks.GetSample(1)) : max( $ActiveTasks.GetSample(1),avg($ActiveTasks.GetSample(TimeInterval_Minute * 15)));
696714
// Set the number of nodes to add to one-fourth the number of active tasks
697-
// (theMaxTasksPerComputeNode property on this pool is set to 4, adjust
715+
// (the TaskSlotsPerNode property on this pool is set to 4, adjust
698716
// this number for your use case)
699717
$cores = $TargetDedicatedNodes * 4;
700718
$extraVMs = (($tasks - $cores) + 3) / 4;

articles/batch/batch-cli-templates.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ the following main concepts:
9898
example, the complete definition for a pool could be placed in the body
9999
and only one parameter defined for `poolId`; only a pool ID string
100100
therefore needs to be supplied to create a pool.
101-
101+
102102
- The template body can be authored by someone with knowledge of Batch and
103103
the applications to be run by Batch; only values for the author-defined
104104
parameters must be supplied when the template is used. A user without
@@ -173,7 +173,7 @@ ffmpeg installed. To use it, supply only a pool ID string and the number of VMs
173173
"vmSize": "STANDARD_D3_V2",
174174
"targetDedicatedNodes": "[parameters('nodeCount')]",
175175
"enableAutoScale": false,
176-
"maxTasksPerNode": 1,
176+
"taskSlotsPerNode": 1,
177177
"packageReferences": [
178178
{
179179
"type": "aptPackage",
@@ -265,7 +265,7 @@ per source video file. See [File groups and file transfer](#file-groups-and-file
265265
},
266266
"taskFactory": {
267267
"type": "taskPerFile",
268-
"source": {
268+
"source": {
269269
"fileGroup": "ffmpeg-input"
270270
},
271271
"repeatTask": {
@@ -327,7 +327,7 @@ A file group equates to a container that is created in the Azure storage account
327327
The Batch CLI extension provides commands to upload files from client to a specified file group and download files from the specified file group to a client.
328328

329329
```azurecli
330-
az batch file upload --local-path c:\source_videos\*.mp4
330+
az batch file upload --local-path c:\source_videos\*.mp4
331331
--file-group ffmpeg-input
332332
333333
az batch file download --file-group ffmpeg-output --local-path

articles/batch/batch-diagnostics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.custom: seodec18
77

88
---
99
# Batch metrics, alerts, and logs for diagnostic evaluation and monitoring
10-
10+
1111
This article explains how to monitor a Batch account using features of [Azure Monitor](../azure-monitor/overview.md). Azure Monitor collects [metrics](../azure-monitor/platform/data-platform-metrics.md) and [diagnostic logs](../azure-monitor/platform/platform-logs-overview.md) for resources in your Batch account. Collect and consume this data in a variety of ways to monitor your Batch account and diagnose issues. You can also configure [metric alerts](../azure-monitor/platform/alerts-overview.md) so you receive notifications when a metric reaches a specified value.
1212

1313
## Batch metrics
@@ -52,7 +52,7 @@ You can configure near real-time *metric alerts* that trigger when the value of
5252

5353
Alerts that trigger on a single data point is not recommended, as metrics are subject to out-of-order delivery, data loss, and/or duplication. When creating your alerts, you can use thresholds to account for these inconsistencies.
5454

55-
For example, you might want to configure a metric alert when your low priority core count falls to a certain level, so you can adjust the composition of your pools. For best results, set a period of 10 or more minutes, where alerts trigger if the average low priority core count falls below the threshold value for the entire period. This allows for more time for metrics to aggregate so that you get more accurate results.
55+
For example, you might want to configure a metric alert when your low priority core count falls to a certain level, so you can adjust the composition of your pools. For best results, set a period of 10 or more minutes, where alerts trigger if the average low priority core count falls below the threshold value for the entire period. This allows for more time for metrics to aggregate so that you get more accurate results.
5656

5757
To configure a metric alert in the Azure portal:
5858

@@ -82,11 +82,11 @@ A common scenario is to select an Azure Storage account as the log destination.
8282

8383
Alternately, you can:
8484

85-
- Stream Batch diagnostic log events to an [Azure Event Hub](../event-hubs/event-hubs-about.md). Event Hubs can ingest millions of events per second, which you can then transform and store using any real-time analytics provider.
85+
- Stream Batch diagnostic log events to an [Azure Event Hub](../event-hubs/event-hubs-about.md). Event Hubs can ingest millions of events per second, which you can then transform and store using any real-time analytics provider.
8686
- Send diagnostic logs to [Azure Monitor logs](../azure-monitor/log-query/log-query-overview.md), where you can analyze them or export them for analysis in Power BI or Excel.
8787

8888
> [!NOTE]
89-
> You may incur additional costs to store or process diagnostic log data with Azure services.
89+
> You may incur additional costs to store or process diagnostic log data with Azure services.
9090
9191
### Enable collection of Batch diagnostic logs
9292

@@ -150,7 +150,7 @@ Azure Batch service logs, if collected, contain events emitted by the Azure Batc
150150
},
151151
"resizeTimeout": "300000",
152152
"targetDedicatedComputeNodes": 2,
153-
"maxTasksPerNode": 1,
153+
"taskSlotsPerNode": 1,
154154
"vmFillType": "Spread",
155155
"enableAutoscale": false,
156156
"enableInterNodeCommunication": false,

articles/batch/batch-mpi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ When you submit a task with multi-instance settings to a job, Batch performs sev
3434
>
3535
3636
## Requirements for multi-instance tasks
37-
Multi-instance tasks require a pool with **inter-node communication enabled**, and with **concurrent task execution disabled**. To disable concurrent task execution, set the [CloudPool.MaxTasksPerComputeNode](/dotnet/api/microsoft.azure.batch.cloudpool) property to 1.
37+
Multi-instance tasks require a pool with **inter-node communication enabled**, and with **concurrent task execution disabled**. To disable concurrent task execution, set the [CloudPool.TaskSlotsPerNode](/dotnet/api/microsoft.azure.batch.cloudpool) property to 1.
3838

3939
> [!NOTE]
4040
> Batch [limits](batch-quota-limit.md#pool-size-limits) the size of a pool that has inter-node communication enabled.
@@ -53,11 +53,11 @@ CloudPool myCloudPool =
5353
// Multi-instance tasks require inter-node communication, and those nodes
5454
// must run only one task at a time.
5555
myCloudPool.InterComputeNodeCommunicationEnabled = true;
56-
myCloudPool.MaxTasksPerComputeNode = 1;
56+
myCloudPool.TaskSlotsPerNode = 1;
5757
```
5858

5959
> [!NOTE]
60-
> If you try to run a multi-instance task in a pool with internode communication disabled, or with a *maxTasksPerNode* value greater than 1, the task is never scheduled--it remains indefinitely in the "active" state.
60+
> If you try to run a multi-instance task in a pool with internode communication disabled, or with a *taskSlotsPerNode* value greater than 1, the task is never scheduled--it remains indefinitely in the "active" state.
6161
6262

6363
### Use a StartTask to install MPI
@@ -94,7 +94,7 @@ Look for the sizes specified as "RDMA capable" in the following articles:
9494
* [Sizes for virtual machines in Azure](../virtual-machines/windows/sizes.md?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) (Windows)
9595

9696
> [!NOTE]
97-
> To take advantage of RDMA on [Linux compute nodes](batch-linux-nodes.md), you must use **Intel MPI** on the nodes.
97+
> To take advantage of RDMA on [Linux compute nodes](batch-linux-nodes.md), you must use **Intel MPI** on the nodes.
9898
>
9999
100100
## Create a multi-instance task with Batch .NET

articles/batch/batch-nodejs-get-started.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.date: 05/22/2017
77

88
# Get started with Batch SDK for Node.js
99

10-
Learn the basics of building a Batch client in Node.js using [Azure Batch Node.js SDK](/javascript/api/overview/azure/batch). We take a step by step approach of understanding a scenario for a batch application and then setting it up using a Node.js client.
10+
Learn the basics of building a Batch client in Node.js using [Azure Batch Node.js SDK](/javascript/api/overview/azure/batch). We take a step by step approach of understanding a scenario for a batch application and then setting it up using a Node.js client.
1111

1212
## Prerequisites
1313
This article assumes that you have a working knowledge of Node.js and familiarity with Linux. It also assumes that you have an Azure account setup with access rights to create Batch and Storage services.
@@ -169,7 +169,7 @@ var cloudPool = batch_client.pool.get(poolid,function(error,result,request,respo
169169
{
170170
if(error.statusCode==404)
171171
{
172-
console.log("Pool not found yet returned 404...");
172+
console.log("Pool not found yet returned 404...");
173173
174174
}
175175
else
@@ -236,7 +236,7 @@ Following is a sample result object returned by the pool.get function.
236236
targetDedicated: 4,
237237
enableAutoScale: false,
238238
enableInterNodeCommunication: false,
239-
maxTasksPerNode: 1,
239+
taskSlotsPerNode: 1,
240240
taskSchedulingPolicy: { nodeFillType: 'Spread' } }
241241
```
242242

@@ -247,7 +247,7 @@ An Azure Batch job is a logical group of similar tasks. In our scenario, it is "
247247
These tasks would run in parallel and deployed across multiple nodes, orchestrated by the Azure Batch service.
248248

249249
> [!Tip]
250-
> You can use the [maxTasksPerNode](https://azure.github.io/azure-sdk-for-node/azure-batch/latest/Pool.html#add) property to specify maximum number of tasks that can run concurrently on a single node.
250+
> You can use the [taskSlotsPerNode](https://azure.github.io/azure-sdk-for-node/azure-batch/latest/Pool.html#add) property to specify maximum number of tasks that can run concurrently on a single node.
251251
>
252252
>
253253
@@ -312,15 +312,15 @@ Assuming we have four containers "con1", "con2", "con3","con4" following code sh
312312
```nodejs
313313
// storing container names in an array
314314
var container_list = ["con1","con2","con3","con4"]
315-
container_list.forEach(function(val,index){
315+
container_list.forEach(function(val,index){
316316
317317
var container_name = val;
318318
var taskID = container_name + "_process";
319319
var task_config = {id:taskID,displayName:'process csv in ' + container_name,commandLine:'python processcsv.py --container ' + container_name,resourceFiles:[{'blobSource':'<blob SAS URI>','filePath':'processcsv.py'}]}
320320
var task = batch_client.task.add(poolid,task_config,function(error,result){
321321
if(error != null)
322322
{
323-
console.log(error.response);
323+
console.log(error.response);
324324
}
325325
else
326326
{
@@ -334,7 +334,7 @@ var container_list = ["con1","con2","con3","con4"]
334334
});
335335
```
336336

337-
The code adds multiple tasks to the pool. And each of the tasks is executed on a node in the pool of VMs created. If the number of tasks exceeds the number of VMs in a pool or the maxTasksPerNode property, the tasks wait until a node is made available. This orchestration is handled by Azure Batch automatically.
337+
The code adds multiple tasks to the pool. And each of the tasks is executed on a node in the pool of VMs created. If the number of tasks exceeds the number of VMs in a pool or the taskSlotsPerNode property, the tasks wait until a node is made available. This orchestration is handled by Azure Batch automatically.
338338

339339
The portal has detailed views on the tasks and job statuses. You can also use the list and get functions in the Azure Node SDK. Details are provided in the documentation [link](https://azure.github.io/azure-sdk-for-node/azure-batch/latest/Job.html).
340340

0 commit comments

Comments
 (0)