1
0
Fork 0

profiles: Use net plugin to disable LRO in sap-hana-vmware

Use net plugin to disable large receive offload in sap-hana-vmware profile.
This also fixes rollback of the setting - previously, after unapplying
the profile, LRO would always be set to 'on', irrespectively of the
original setting.

The network interfaces which should have LRO disabled must be listed
in /etc/tuned/sap-hana-vmware-variables.conf, e.g. like this:
sap_hana_vmware_nic=eth0

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
Ondřej Lysoněk 2017-09-19 16:38:15 +02:00
parent 179886cf51
commit b970238a3d
5 changed files with 15 additions and 24 deletions

View file

@ -137,6 +137,8 @@ install: install-dirs
$(DESTDIR)/etc/tuned/realtime-virtual-host-variables.conf
mv $(DESTDIR)$(TUNED_PROFILESDIR)/cpu-partitioning/cpu-partitioning-variables.conf \
$(DESTDIR)/etc/tuned/cpu-partitioning-variables.conf
mv $(DESTDIR)$(TUNED_PROFILESDIR)/sap-hana-vmware/sap-hana-vmware-variables.conf \
$(DESTDIR)/etc/tuned/sap-hana-vmware-variables.conf
install -pm 0644 recommend.conf $(DESTDIR)$(TUNED_RECOMMEND_DIR)/50-tuned.conf
# bash completion

View file

@ -0,0 +1,3 @@
# Set this to the network interfaces which should have
# large receive offload disabled
sap_hana_vmware_nic=!*

View file

@ -1,22 +0,0 @@
#!/bin/bash
# SAP ktune script
#
# TODO: drop this script and implement native support
# into plugins
. /usr/lib/tuned/functions
start() {
ethtool -K eth0 lro off
return 0
}
stop() {
ethtool -K eth0 lro on
return 0
}
process $@

View file

@ -6,6 +6,11 @@
summary=Optimize for SAP HANA running inside a VMware guest
include=throughput-performance
[variables]
# User is responsible for setting sap_hana_vmware_nic
# in sap-hana-vmware-variables.conf
include=/etc/tuned/sap-hana-vmware-variables.conf
[cpu]
force_latency=1
@ -17,5 +22,6 @@ vm.swappiness = 30
kernel.sem = 1250 256000 100 8192
kernel.numa_balancing = 0
[script]
script=${i:PROFILE_DIR}/script.sh
[net]
devices=${sap_hana_vmware_nic}
features=lro off

View file

@ -267,6 +267,7 @@ fi
%exclude %{_sysconfdir}/tuned/realtime-virtual-guest-variables.conf
%exclude %{_sysconfdir}/tuned/realtime-virtual-host-variables.conf
%exclude %{_sysconfdir}/tuned/cpu-partitioning-variables.conf
%exclude %{_sysconfdir}/tuned/sap-hana-vmware-variables.conf
%exclude %{_prefix}/lib/tuned/default
%exclude %{_prefix}/lib/tuned/desktop-powersave
%exclude %{_prefix}/lib/tuned/laptop-ac-powersave
@ -341,6 +342,7 @@ fi
%files profiles-sap-hana
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/tuned/sap-hana-vmware-variables.conf
%{_prefix}/lib/tuned/sap-hana
%{_prefix}/lib/tuned/sap-hana-vmware
%{_mandir}/man7/tuned-profiles-sap-hana.7*