Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1426654 - tuned recommend auto-parent
tuned recommend auto-parent
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned (Show other bugs)
All Linux
unspecified Severity high
: rc
: ---
Assigned To: Jaroslav Škarvada
Tereza Cerna
: Patch, Upstream
Depends On:
  Show dependency treegraph
Reported: 2017-02-24 09:35 EST by Jeremy Eder
Modified: 2017-08-01 08:35 EDT (History)
5 users (show)

See Also:
Fixed In Version: tuned-2.8.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-08-01 08:35:21 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)

External Trackers
Tracker ID Priority Status Summary Last Updated
Github https://github.com/redhat-performance/tuned/issues/17 None None None 2017-02-24 09:47 EST
Red Hat Product Errata RHBA-2017:2102 normal SHIPPED_LIVE tuned bug fix and enhancement update 2017-08-01 12:07:33 EDT

  None (edit)
Description Jeremy Eder 2017-02-24 09:35:23 EST
Description of problem:

In order to deliver optimal performance on both bare metal and virtual machines, we have a separate profile called virtual-guest which adds tunings we found beneficial for KVM.

This adds some complexity for layered products in that they must now maintain separate profiles for bare metal and VMs.

We would like to reduce this complexity and only have a single profile for layered products that automatically sets the correct parent based on the existing recommend feature.
Comment 1 Red Hat Bugzilla Rules Engine 2017-02-24 09:35:29 EST
Since this bug report was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.
Comment 3 Jaroslav Škarvada 2017-02-24 09:47:43 EST
This is an request to extend Tuned engine to:

- support variables and built-in functions in [main] block of tuned.conf
- add something like ${f:vm:STR1:STR2} function which would expand to STR1 in case of VM (i.e. virt-what returns non empty string) or STR2 in case of bare metal (virt-what returns empty string).

This could be used by e.g.:

This would include 'virtual-guest' profile if running inside VM and 'throughput-performance' if running on bare metal.

This would also allow combinations like:

would result in inclusion of myprofile-guest inside VM and myprofile-host on bare-metal.
Comment 4 Jaroslav Škarvada 2017-04-04 09:25:28 EDT
Added support in following upstream commit:

The virt_check builtin function expands to the first argument if
running inside virtual machine, otherwise it expands to the second
argument (when on bare metal or in case of error). It uses virt-what
as a backend.

So now the following can be used to lower fragmentation of Tuned profiles:


So it will include virtual-guest if running inside virtual machine,
otherwise it includes virtual-host.

It only added support for the functionality, but it didn't change currently provided profiles.
Comment 10 Tereza Cerna 2017-06-20 07:55:19 EDT
Verified in:

>> Have a testing profiles:

# cat /usr/lib/tuned/myprofile-test/tuned.conf 

# cat /usr/lib/tuned/myprofile-virtual/tuned.conf 

# cat /usr/lib/tuned/myprofile-baremetal/tuned.conf 

>> Test on virtual machine:

# tuned-adm profile myprofile-test
# sysctl vm.swappiness
vm.swappiness = 11

>> Test on bare metal machine:

# tuned-adm profile myprofile-test
# sysctl vm.swappiness
vm.swappiness = 22

Testing profiles were used well. There was included 'myprofile-virtual' on virtual machine and 'myprofile-baremetal' on bare metal machine.
Comment 11 errata-xmlrpc 2017-08-01 08:35:21 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.