Skip to content

Commit

Permalink
Submitting a proposed fix for the timer too close issue from #382.
Browse files Browse the repository at this point in the history
  • Loading branch information
goeland86 committed Sep 27, 2023
1 parent 1373dcb commit 179886e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/linux_preparation/files/cpufreq.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=cpufreq-set to force the CPU governor to performance on boot

[Service]
ExecStart=/opt/cpufreqset.sh

[Install]
WantedBy=multi-user.target
6 changes: 6 additions & 0 deletions roles/linux_preparation/files/cpufreq.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

cpufreq-set -c0 -g performance
cpufreq-set -c1 -g performance
cpufreq-set -c2 -g performance
cpufreq-set -c3 -g performance
22 changes: 22 additions & 0 deletions roles/linux_preparation/tasks/recore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,25 @@

- name: Recore - force debian password reset
shell: chage -d 0 debian

- name: Recore - install script to set CPU to use performance governor
copy:
src: '{{ role_path }}/files/cpufreq.sh'
dest: /opt/cpufreq.sh
mode: '0755'
owner: debian
group: debian

- name: Recore - install service for CPU performance governor use
copy:
src: '{{ role_path }}/files/cpufreq.service'
dest: /etc/systemd/system/cpufreq.service
mode: '0644'
owner: root
group: root

- name: Recore - enable the CPU performance governor usage
systemd:
daemon-reload: true
enabled: true
name: cpufreq

0 comments on commit 179886e

Please sign in to comment.