Bug 1426654 - tuned recommend auto-parent
Summary: tuned recommend auto-parent
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned (Show other bugs)
(Show other bugs)
Version: 7.4
Hardware: All Linux
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: Tereza Cerna
Keywords: Patch, Upstream
Depends On:
TreeView+ depends on / blocked
Reported: 2017-02-24 14:35 UTC by Jeremy Eder
Modified: 2017-08-01 12:35 UTC (History)
5 users (show)

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 12:35:21 UTC
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 14:47 UTC
Red Hat Product Errata RHBA-2017:2102 normal SHIPPED_LIVE tuned bug fix and enhancement update 2017-08-01 16:07:33 UTC

Description Jeremy Eder 2017-02-24 14:35:23 UTC
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 14:35:29 UTC
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 14:47:43 UTC
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 13:25:28 UTC
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 11:55:19 UTC
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 12:35:21 UTC
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.