RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1426654 - tuned recommend auto-parent
Summary: tuned recommend auto-parent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuned
Version: 7.4
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: Tereza Cerna
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2017-08-01 12:35:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github https://github.com/redhat-performance tuned issues 17 0 None None None 2017-02-24 14:47:43 UTC
Red Hat Product Errata RHBA-2017:2102 0 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.:
[main]
include=${f:vm:virtual-guest:throughput-performance}

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

This would also allow combinations like:
[main]
include=myprofile-${f:vm:guest:host}

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:
https://github.com/redhat-performance/tuned/commit/a1b9e606449715202b4feccf8b6de23e278b776f

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:

[main]
include=virtual-${f:virt_check:guest:host}

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:
    tuned-2.8.0-5.el7.noarch
PASS
============================

>> Have a testing profiles:

# cat /usr/lib/tuned/myprofile-test/tuned.conf 
[main]
include=myprofile-${f:virt_check:virtual:baremetal}

# cat /usr/lib/tuned/myprofile-virtual/tuned.conf 
[sysctl]
vm.swappiness=11

# cat /usr/lib/tuned/myprofile-baremetal/tuned.conf 
[sysctl]
vm.swappiness=22

>> 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.

https://access.redhat.com/errata/RHBA-2017:2102


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