Bug 1313489 - tuned restart temporarily resets ktune settings
tuned restart temporarily resets ktune settings
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tuned (Show other bugs)
All Linux
high Severity high
: rc
: ---
Assigned To: Jaroslav Škarvada
Tereza Cerna
: Patch
Depends On:
Blocks: 1172231 1269194 1359261
  Show dependency treegraph
Reported: 2016-03-01 11:58 EST by Julio Entrena Perez
Modified: 2017-03-21 07:21 EDT (History)
6 users (show)

See Also:
Fixed In Version: tuned-0.2.19-18.el6
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-03-21 07:21:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Julio Entrena Perez 2016-03-01 11:58:16 EST
Description of problem:
Due to file /lib/udev/tuned-request-ktune-restart sending a USR2 signal to tuned process on device events, settings in <profile_name>/ktune.sh are momentarily reverted to their defaults before being re-applied again.

For example, when a VM is started on a RHEV host the LVM logical volume(s) for that VM are activated, which results in performance CPU governor being disabled and then enabled back again.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Start a RHEV VM on that host (or just issue "service ktune condrestart" to simulate the same behaviour).
2. Wait 10 seconds after starting the VM (no need to wait for "service ktune condrestart").

Actual results:
In /var/log/tuned/tuned.log :
2016-02-29 11:18:07,434 INFO     tuned: performing ktune conditional restart

In /var/log/messages :
Feb 29 11:18:07 rhevh1-375 cpuspeed: Disabling performance cpu frequency scaling governor
Feb 29 11:18:08 rhevh1-375 cpuspeed: Enabling performance cpu frequency scaling governor

Expected results:
performance cpu governor is not temporarily disabled.

Additional info:
This is a continuation of bug 1111416, where settings in <profile_name>/sysctl.ktune are preserved on stop / restart.
The same is needed for settings in <profile_name>/ktune.sh .
Comment 5 Tereza Cerna 2016-11-29 05:42:25 EST
This bug is Ok. Switch to status VERIFIED.
Comment 6 Jaroslav Škarvada 2016-11-29 08:26:16 EST
While the proposed patch fixed Tuned and it behaves now correctly, it seems there is still problem with the 'cpuspeed' package which is used by Tuned.

I checked cpuspeed code and it seems when it writes:
Disabling GOVERNOR cpu frequency scaling governor

It reverts governor to the 'userspace' for all CPUs if acpi-cpufreq scaling driver is used or to the 'powersave' if intel_pstate driver is used. Then immediately it sets the governor which is requested (e.g. performance), i.e. the following:
Nov 25 05:37:13 hp-dl120gen9-01 cpuspeed: Disabling performance cpu frequency scaling governor
Nov 25 05:37:13 hp-dl120gen9-01 cpuspeed: Enabling performance cpu frequency scaling governor

Is also bad as it will probably also cause spike.

We can either:

a) fix cpuspeed
b) drop cpuspeed from Tuned

Regarding b) Tuned already knows how to set the governor through the sysfs and uses this method as a backup if cpuspeed is not installed.
Comment 7 Tereza Cerna 2016-11-29 08:32:16 EST
Problem with cpuspeed was found. Switch this bug to ASSIGNED.
Comment 9 Tereza Cerna 2016-12-07 04:37:31 EST
Verified that governor is not switched to another state and then back again. Behaves as expected.

Fixed in tuned-0.2.19-18.el6.noarch
Comment 11 errata-xmlrpc 2017-03-21 07:21:41 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.