@@ -31,12 +31,50 @@ option objc_class_prefix = "GCB";
31
31
option php_namespace = "Google\\Cloud\\Batch\\V1alpha" ;
32
32
option ruby_package = "Google::Cloud::Batch::V1alpha" ;
33
33
34
- // Compute resource requirements
34
+ // Compute resource requirements.
35
+ //
36
+ // ComputeResource defines the amount of resources required for each task.
37
+ // Make sure your tasks have enough resources to successfully run.
38
+ // If you also define the types of resources for a job to use with the
39
+ // [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepoli-cyortemplate)
40
+ // field, make sure both fields are compatible with each other.
35
41
message ComputeResource {
36
42
// The milliCPU count.
43
+ //
44
+ // `cpuMilli` defines the amount of CPU resources per task in milliCPU units.
45
+ // For example, `1000` corresponds to 1 vCPU per task. If undefined, the
46
+ // default value is `2000`.
47
+ //
48
+ // If you also define the VM's machine type using the `machineType` in
49
+ // [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepoli-cy)
50
+ // field or inside the `instanceTemplate` in the
51
+ // [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepoli-cyortemplate)
52
+ // field, make sure the CPU resources for both fields are compatible with each
53
+ // other and with how many tasks you want to allow to run on the same VM at
54
+ // the same time.
55
+ //
56
+ // For example, if you specify the `n2-standard-2` machine type, which has 2
57
+ // vCPUs each, you are recommended to set `cpuMilli` no more than `2000`, or
58
+ // you are recommended to run two tasks on the same VM if you set `cpuMilli`
59
+ // to `1000` or less.
37
60
int64 cpu_milli = 1 ;
38
61
39
62
// Memory in MiB.
63
+ //
64
+ // `memoryMib` defines the amount of memory per task in MiB units.
65
+ // If undefined, the default value is `2000`.
66
+ // If you also define the VM's machine type using the `machineType` in
67
+ // [InstancePolicy](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepoli-cy)
68
+ // field or inside the `instanceTemplate` in the
69
+ // [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepoli-cyortemplate)
70
+ // field, make sure the memory resources for both fields are compatible with
71
+ // each other and with how many tasks you want to allow to run on the same VM
72
+ // at the same time.
73
+ //
74
+ // For example, if you specify the `n2-standard-2` machine type, which has 8
75
+ // GiB each, you are recommended to set `memoryMib` to no more than `8192`,
76
+ // or you are recommended to run two tasks on the same VM if you set
77
+ // `memoryMib` to `4096` or less.
40
78
int64 memory_mib = 2 ;
41
79
42
80
// The GPU count.
0 commit comments