@@ -31,12 +31,50 @@ option objc_class_prefix = "GCB";
3131option php_namespace = "Google\\Cloud\\Batch\\V1alpha" ;
3232option ruby_package = "Google::Cloud::Batch::V1alpha" ;
3333
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#instancepolicyortemplate)
40+ // field, make sure both fields are compatible with each other.
3541message ComputeResource {
3642 // 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#instancepolicy)
50+ // field or inside the `instanceTemplate` in the
51+ // [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate)
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.
3760 int64 cpu_milli = 1 ;
3861
3962 // 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#instancepolicy)
68+ // field or inside the `instanceTemplate` in the
69+ // [InstancePolicyOrTemplate](https://cloud.google.com/batch/docs/reference/rest/v1/projects.locations.jobs#instancepolicyortemplate)
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.
4078 int64 memory_mib = 2 ;
4179
4280 // The GPU count.
0 commit comments