Skip to content

Commit 5307a23

Browse files
committed
Adding unkillable_step_timeout (UnkillableStepTimeut) as a default parameter to the H4D blueprint.
It has been observed that for large jobs on 32 node+ clusters, we often hit the QueuePair (QP) limit, leading to SIGKILL and subsequent cleaning of QPs. The process of QP cleaning can take upto 12 minutes currently, which is more than twice the default UnkillableStepTimeout of 300 seconds. This breach of timeout results in the affected nodes being marked as "DRAIN" rendering them unusable for any future jobs without explicit restart operations. With this change we are providing an additional parameter within the blueprint to alter this value based on the workload and usage. The change was tested on a 32 node cluster that ran Intel MPI benchmark and created >900K QPs before being killed. All the nodes successfully returned to "IDLE" state after QP cleaning An earlier PR added SlurmdTimeout to the blueprint to mitigate this issue but intensive testing revealed that to be an incorrect approach, hence removing the slurmd_timeout(SlurmdTimeout) parameter from the blueprint to avoid unnecessary clutter. Users can still specify slurmd_timeout in blueprints since it is still accepted as a valid blueprint param.
1 parent 0d35ba4 commit 5307a23

7 files changed

Lines changed: 40 additions & 31 deletions

File tree

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ limitations under the License.
313313
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | Name of GCS bucket.<br/>Ignored when 'create\_bucket' is true. | `string` | `null` | no |
314314
| <a name="input_can_ip_forward"></a> [can\_ip\_forward](#input\_can\_ip\_forward) | Enable IP forwarding, for NAT instances for example. | `bool` | `false` | no |
315315
| <a name="input_cgroup_conf_tpl"></a> [cgroup\_conf\_tpl](#input\_cgroup\_conf\_tpl) | Slurm cgroup.conf template file path. | `string` | `null` | no |
316-
| <a name="input_cloud_parameters"></a> [cloud\_parameters](#input\_cloud\_parameters) | cloud.conf options. Defaults inherited from [Slurm GCP repo](https://github.com/GoogleCloudPlatform/slurm-gcp/blob/master/terraform/slurm_cluster/modules/slurm_files/README_TF.md#input_cloud_parameters) | <pre>object({<br/> no_comma_params = optional(bool, false)<br/> private_data = optional(list(string))<br/> scheduler_parameters = optional(list(string))<br/> resume_rate = optional(number)<br/> resume_timeout = optional(number)<br/> suspend_rate = optional(number)<br/> suspend_timeout = optional(number)<br/> slurmd_timeout = optional(number)<br/> topology_plugin = optional(string)<br/> topology_param = optional(string)<br/> tree_width = optional(number)<br/> prolog_flags = optional(string)<br/> switch_type = optional(string)<br/> })</pre> | `{}` | no |
316+
| <a name="input_cloud_parameters"></a> [cloud\_parameters](#input\_cloud\_parameters) | cloud.conf options. Defaults inherited from [Slurm GCP repo](https://github.com/GoogleCloudPlatform/slurm-gcp/blob/master/terraform/slurm_cluster/modules/slurm_files/README_TF.md#input_cloud_parameters) | <pre>object({<br/> no_comma_params = optional(bool, false)<br/> private_data = optional(list(string))<br/> scheduler_parameters = optional(list(string))<br/> resume_rate = optional(number)<br/> resume_timeout = optional(number)<br/> suspend_rate = optional(number)<br/> suspend_timeout = optional(number)<br/> slurmd_timeout = optional(number)<br/> unkillable_step_timeout = optional(number)<br/> topology_plugin = optional(string)<br/> topology_param = optional(string)<br/> tree_width = optional(number)<br/> prolog_flags = optional(string)<br/> switch_type = optional(string)<br/> })</pre> | `{}` | no |
317317
| <a name="input_cloudsql"></a> [cloudsql](#input\_cloudsql) | Use this database instead of the one on the controller.<br/> server\_ip : Address of the database server.<br/> user : The user to access the database as.<br/> password : The password, given the user, to access the given database. (sensitive)<br/> db\_name : The database to access.<br/> user\_managed\_replication : The list of location and (optional) kms\_key\_name for secret | <pre>object({<br/> server_ip = string<br/> user = string<br/> password = string # sensitive<br/> db_name = string<br/> user_managed_replication = optional(list(object({<br/> location = string<br/> kms_key_name = optional(string)<br/> })), [])<br/> })</pre> | `null` | no |
318318
| <a name="input_compute_startup_script"></a> [compute\_startup\_script](#input\_compute\_startup\_script) | DEPRECATED: `compute_startup_script` has been deprecated.<br/>Use `startup_script` of nodeset module instead. | `any` | `null` | no |
319319
| <a name="input_compute_startup_scripts_timeout"></a> [compute\_startup\_scripts\_timeout](#input\_compute\_startup\_scripts\_timeout) | The timeout (seconds) applied to each startup script in compute nodes. If<br/>any script exceeds this timeout, then the instance setup process is considered<br/>failed and handled accordingly.<br/><br/>NOTE: When set to 0, the timeout is considered infinite and thus disabled. | `number` | `300` | no |

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ No modules.
6868
| <a name="input_bucket_dir"></a> [bucket\_dir](#input\_bucket\_dir) | Bucket directory for cluster files to be put into. | `string` | `null` | no |
6969
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | Name of GCS bucket to use. | `string` | n/a | yes |
7070
| <a name="input_cgroup_conf_tpl"></a> [cgroup\_conf\_tpl](#input\_cgroup\_conf\_tpl) | Slurm cgroup.conf template file path. | `string` | `null` | no |
71-
| <a name="input_cloud_parameters"></a> [cloud\_parameters](#input\_cloud\_parameters) | cloud.conf options. Default behavior defined in scripts/conf.py | <pre>object({<br/> no_comma_params = optional(bool, false)<br/> private_data = optional(list(string))<br/> scheduler_parameters = optional(list(string))<br/> resume_rate = optional(number)<br/> resume_timeout = optional(number)<br/> suspend_rate = optional(number)<br/> suspend_timeout = optional(number)<br/> slurmd_timeout = optional(number)<br/> topology_plugin = optional(string)<br/> topology_param = optional(string)<br/> tree_width = optional(number)<br/> prolog_flags = optional(string)<br/> switch_type = optional(string)<br/> })</pre> | `{}` | no |
71+
| <a name="input_cloud_parameters"></a> [cloud\_parameters](#input\_cloud\_parameters) | cloud.conf options. Default behavior defined in scripts/conf.py | <pre>object({<br/> no_comma_params = optional(bool, false)<br/> private_data = optional(list(string))<br/> scheduler_parameters = optional(list(string))<br/> resume_rate = optional(number)<br/> resume_timeout = optional(number)<br/> suspend_rate = optional(number)<br/> suspend_timeout = optional(number)<br/> slurmd_timeout = optional(number)<br/> unkillable_step_timeout = optional(number)<br/> topology_plugin = optional(string)<br/> topology_param = optional(string)<br/> tree_width = optional(number)<br/> prolog_flags = optional(string)<br/> switch_type = optional(string)<br/> })</pre> | `{}` | no |
7272
| <a name="input_cloudsql_secret"></a> [cloudsql\_secret](#input\_cloudsql\_secret) | Secret URI to cloudsql secret. | `string` | `null` | no |
7373
| <a name="input_compute_startup_scripts_timeout"></a> [compute\_startup\_scripts\_timeout](#input\_compute\_startup\_scripts\_timeout) | The timeout (seconds) applied to each script in compute\_startup\_scripts. If<br/>any script exceeds this timeout, then the instance setup process is considered<br/>failed and handled accordingly.<br/><br/>NOTE: When set to 0, the timeout is considered infinite and thus disabled. | `number` | `300` | no |
7474
| <a name="input_controller_network_attachment"></a> [controller\_network\_attachment](#input\_controller\_network\_attachment) | SelfLink for NetworkAttachment to be attached to the controller, if any. | `string` | `null` | no |

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def get(key, default):
133133
"SuspendRate": get("suspend_rate", 0),
134134
"SuspendTimeout": get("suspend_timeout", 300),
135135
"SlurmdTimeout": get("slurmd_timeout", 300),
136+
"UnkillableStepTimeout": get("unkillable_step_timeout", 300),
136137
"TreeWidth": get("tree_width", default_tree_width),
137138
"JobSubmitPlugins": "lua" if any_tpu else None,
138139
"TopologyPlugin": topology_plugin(lkp),

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/tests/test_conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def test_dict_to_conf(value: dict, want: str):
101101
SuspendRate=0
102102
SuspendTimeout=300
103103
SlurmdTimeout=300
104+
UnkillableStepTimeout=300
104105
TreeWidth=128
105106
TopologyPlugin=topology/tree
106107
TopologyParam=SwitchAsNodeRank"""),
@@ -114,6 +115,7 @@ def test_dict_to_conf(value: dict, want: str):
114115
"resume_timeout": None,
115116
"suspend_rate": None,
116117
"suspend_timeout": None,
118+
"unkillable_step_timeout": None,
117119
"slurmd_timeout": None,
118120
"topology_plugin": None,
119121
"topology_param": None,
@@ -129,6 +131,7 @@ def test_dict_to_conf(value: dict, want: str):
129131
SuspendRate=0
130132
SuspendTimeout=300
131133
SlurmdTimeout=300
134+
UnkillableStepTimeout=300
132135
TreeWidth=128
133136
TopologyPlugin=topology/tree
134137
TopologyParam=SwitchAsNodeRank"""),
@@ -151,7 +154,8 @@ def test_dict_to_conf(value: dict, want: str):
151154
"suspend_rate": 3,
152155
"suspend_timeout": 4,
153156
"slurmd_timeout": 5,
154-
"tree_width": 6,
157+
"unkillable_step_timeout": 6,
158+
"tree_width": 7,
155159
"topology_plugin": "guess",
156160
"topology_param": "yellow",
157161
},
@@ -166,7 +170,8 @@ def test_dict_to_conf(value: dict, want: str):
166170
SuspendRate=3
167171
SuspendTimeout=4
168172
SlurmdTimeout=5
169-
TreeWidth=6
173+
UnkillableStepTimeout=6
174+
TreeWidth=7
170175
TopologyPlugin=guess
171176
TopologyParam=yellow"""),
172177
(TstCfg(
@@ -187,6 +192,7 @@ def test_dict_to_conf(value: dict, want: str):
187192
SuspendRate=0
188193
SuspendTimeout=300
189194
SlurmdTimeout=300
195+
UnkillableStepTimeout=300
190196
TreeWidth=128
191197
TopologyPlugin=topology/tree
192198
TopologyParam=SwitchAsNodeRank"""),

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/variables.tf

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -339,19 +339,20 @@ variable "nodeset_tpu" {
339339
variable "cloud_parameters" {
340340
description = "cloud.conf options. Default behavior defined in scripts/conf.py"
341341
type = object({
342-
no_comma_params = optional(bool, false)
343-
private_data = optional(list(string))
344-
scheduler_parameters = optional(list(string))
345-
resume_rate = optional(number)
346-
resume_timeout = optional(number)
347-
suspend_rate = optional(number)
348-
suspend_timeout = optional(number)
349-
slurmd_timeout = optional(number)
350-
topology_plugin = optional(string)
351-
topology_param = optional(string)
352-
tree_width = optional(number)
353-
prolog_flags = optional(string)
354-
switch_type = optional(string)
342+
no_comma_params = optional(bool, false)
343+
private_data = optional(list(string))
344+
scheduler_parameters = optional(list(string))
345+
resume_rate = optional(number)
346+
resume_timeout = optional(number)
347+
suspend_rate = optional(number)
348+
suspend_timeout = optional(number)
349+
slurmd_timeout = optional(number)
350+
unkillable_step_timeout = optional(number)
351+
topology_plugin = optional(string)
352+
topology_param = optional(string)
353+
tree_width = optional(number)
354+
prolog_flags = optional(string)
355+
switch_type = optional(string)
355356
})
356357
default = {}
357358
nullable = false

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/variables.tf

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -456,19 +456,20 @@ EOD
456456
variable "cloud_parameters" {
457457
description = "cloud.conf options. Defaults inherited from [Slurm GCP repo](https://github.com/GoogleCloudPlatform/slurm-gcp/blob/master/terraform/slurm_cluster/modules/slurm_files/README_TF.md#input_cloud_parameters)"
458458
type = object({
459-
no_comma_params = optional(bool, false)
460-
private_data = optional(list(string))
461-
scheduler_parameters = optional(list(string))
462-
resume_rate = optional(number)
463-
resume_timeout = optional(number)
464-
suspend_rate = optional(number)
465-
suspend_timeout = optional(number)
466-
slurmd_timeout = optional(number)
467-
topology_plugin = optional(string)
468-
topology_param = optional(string)
469-
tree_width = optional(number)
470-
prolog_flags = optional(string)
471-
switch_type = optional(string)
459+
no_comma_params = optional(bool, false)
460+
private_data = optional(list(string))
461+
scheduler_parameters = optional(list(string))
462+
resume_rate = optional(number)
463+
resume_timeout = optional(number)
464+
suspend_rate = optional(number)
465+
suspend_timeout = optional(number)
466+
slurmd_timeout = optional(number)
467+
unkillable_step_timeout = optional(number)
468+
topology_plugin = optional(string)
469+
topology_param = optional(string)
470+
tree_width = optional(number)
471+
prolog_flags = optional(string)
472+
switch_type = optional(string)
472473
})
473474
default = {}
474475
nullable = false

examples/hpc-slurm-h4d.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ deployment_groups:
127127
settings:
128128
enable_controller_public_ips: true
129129
cloud_parameters:
130-
slurmd_timeout: 900
130+
unkillable_step_timeout: 900

0 commit comments

Comments
 (0)