Skip to content

Fix tuned hpc-compute with hugepages and verify applied profile #672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ansible/roles/tuned/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@
register: _tuned_profile_current
changed_when: false

- name: Set tuned-adm profile
- name: Set TuneD profile
ansible.builtin.command:
cmd: "tuned-adm profile {{ tuned_profile }}"
when:
when:
- tuned_started | bool
- tuned_profile not in _tuned_profile_current.stdout

- name: Verify TuneD profile
ansible.builtin.command:
cmd: tuned-adm verify
changed_when: false
when:
- tuned_started | bool
- tuned_profile not in _tuned_profile_current.stdout
13 changes: 12 additions & 1 deletion ansible/roles/tuned/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,15 @@
- name: Install tuneD
ansible.builtin.dnf:
name: tuned
state: present
state: present

- name: Fix TuneD hpc-compute profile for hugepages
# See https://github.com/redhat-performance/tuned/issues/752
# This is done on install, not configure, so that it is available even
# for compute-init nodes
community.general.ini_file:
path: /usr/lib/tuned/hpc-compute/tuned.conf
section: sysctl
option: vm.min_free_kbytes
value: '>135168'
no_extra_spaces: true
3 changes: 3 additions & 0 deletions environments/.stackhpc/inventory/extra_groups
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ cluster

[tuned:children]
# Install tuned into fat image
# NB: builder has tuned_enabled and tuned_started false so does not configure it
builder
# Also test tuned during site playbook
cluster

[squid:children]
# Install squid into fat image
Expand Down
2 changes: 2 additions & 0 deletions environments/.stackhpc/inventory/group_vars/all/tuned.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Set profile which is not default (on VMs) for testing
tuned_profile: hpc-compute
4 changes: 2 additions & 2 deletions environments/.stackhpc/tofu/cluster_image.auto.tfvars.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"cluster_image": {
"RL8": "openhpc-RL8-250514-1502-5a923b2c",
"RL9": "openhpc-RL9-250514-1502-5a923b2c"
"RL8": "openhpc-RL8-250610-1435-d0ef926e",
"RL9": "openhpc-RL9-250610-1435-d0ef926e"
}
}
2 changes: 1 addition & 1 deletion environments/common/inventory/group_vars/all/nfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ nfs_configurations_extra: [] # site-specific nfs shares

nfs_configurations: >- # construct stackhpc.nfs variable
{{
nfs_configuration_home_volume if (cluster_home_volume | default(true)) else []
(nfs_configuration_home_volume if (cluster_home_volume | default(true)) else [])
+
nfs_configuration_compute_nodes
+
Expand Down