Skip to content

Commit 36e5714

Browse files
committed
fix tuned on baremetal for hugepages, and test
1 parent e50f964 commit 36e5714

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

ansible/roles/tuned/tasks/configure.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@
1212
register: _tuned_profile_current
1313
changed_when: false
1414

15-
- name: Set tuned-adm profile
15+
- name: Set TuneD profile
1616
ansible.builtin.command:
1717
cmd: "tuned-adm profile {{ tuned_profile }}"
18-
when:
18+
when:
19+
- tuned_started | bool
20+
- tuned_profile not in _tuned_profile_current.stdout
21+
22+
- name: Verify TuneD profile
23+
ansible.builtin.command:
24+
cmd: tuned-adm verify
25+
changed_when: false
26+
when:
1927
- tuned_started | bool
2028
- tuned_profile not in _tuned_profile_current.stdout

ansible/roles/tuned/tasks/install.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@
22
- name: Install tuneD
33
ansible.builtin.dnf:
44
name: tuned
5-
state: present
5+
state: present
6+
7+
- name: Fix TuneD hpc-compute profile for hugepages
8+
# See https://github.com/redhat-performance/tuned/issues/752
9+
# This is done on install, not configure, so that it is available even
10+
# for compute-init nodes
11+
community.general.ini_file:
12+
path: /usr/lib/tuned/hpc-compute/tuned.conf
13+
section: sysctl
14+
option: vm.min_free_kbytes
15+
value: '>135168'
16+
no_extra_spaces: true

environments/.stackhpc/inventory/extra_groups

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ cluster
2929

3030
[tuned:children]
3131
# Install tuned into fat image
32+
# NB: builder has tuned_enabled and tuned_started false so does not configure it
3233
builder
34+
# Also test tuned during site playbook
35+
cluster
3336

3437
[squid:children]
3538
# Install squid into fat image
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set profile which is not default (on VMs) for testing
2+
tuned_profile: hpc-compute

0 commit comments

Comments
 (0)