SUSE Linux Enterprise Server for SAP Applications 12 SP 4
In /var/log/tuned/tuned.log the following error is observed
2019-10-04 17:33:53,280 ERROR tuned.utils.commands: Writing to file /sys/block/vda/queue/scheduler error: [Errno 22] Invalid argument
2019-10-04 17:33:53,281 ERROR tuned.utils.commands: Writing to file /sys/block/vdb/queue/scheduler error: [Errno 22] Invalid argument
Checking the scheduler settings for the block devices show they are different from the settings in the selected tuned profile:
testvm:~ # lsblk -o 'NAME,KNAME,MAJ:MIN,FSTYPE,LABEL,RO,RM,MODEL,SIZE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,MOUNTPOINT'
NAME KNAME MAJ:MIN FSTYPE LABEL RO RM MODEL SIZE OWNER GROUP MODE ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED MOUNTPOINT
vda vda 254:0 0 0 36G root disk brw-rw---- 0 512 0 512 512 1 mq-deadline
├─vda1 vda1 254:1 ext3 logs 0 0 2G root disk brw-rw---- 0 512 0 512 512 1 mq-deadline /var/log/local
└─vda2 vda2 254:2 swap 0 0 33G root disk brw-rw---- 0 512 0 512 512 1 mq-deadline [SWAP]
vdb vdb 254:16 1 0 256K root disk brw-rw---- 0 512 0 512 512 1 mq-deadline
Checking the available scheduler settings show different options than the well known ones (deadline, noop, cfq):
testvm:~ # cat /sys/block/vd*/queue/scheduler
[mq-deadline] kyber bfq none
[mq-deadline] kyber bfq none
An override profile may be created as /etc/tuned/<profile-name>/profile.conf:
During the next steps the <profile-name> "sap-hana" will be used.
- mkdir /etc/tuned/sap-hana/
- cp /usr/lib/tuned/sap-hana/tuned.conf /etc/tuned/sap-hana/tuned.conf
- Change the line "elevator = " to the preferred scheduler
- Change the line "script = script.sh" to "script = /usr/lib/tuned/<profile-name>/script.sh"
- Activate the new settings using tuned-adm profile <profile-name>:
tuned-adm profile sap-hana
The situation described above was seen when a KVM VM using tuned was configured using the noop scheduler but when checking showed mq-deadline despite correct
setting in the respective tuned.conf file. Due to changes in the kernel new multiqueue I/O schedulers were introduced and the naming changed, this
is why "invalid argument" is reported in tuned.log as an
echo noop > /sys/block/vda/queue/scheduler
is no longer accepted as valid option.
This example demonstrates the change of the kernel scheduler currently using the cfq scheduler. The correct scheduler in this VM scenario would be noop:
sles4sap12sp4:~ # lsblk -o 'NAME,KNAME,MAJ:MIN,FSTYPE,LABEL,RO,RM,MODEL,SIZE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,MOUNTPOINT'
NAME KNAME MAJ:MIN FSTYPE LABEL RO RM MODEL SIZE OWNER GROUP MODE ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED MOUNTPOINT
sda sda 8:0 0 0 Virtual disk 50G root disk brw-rw---- 0 512 0 512 512 1 cfq
├─sda1 sda1 8:1 swap 0 0 2G root disk brw-rw---- 0 512 0 512 512 1 cfq [SWAP]
└─sda2 sda2 8:2 btrfs 0 0 48G root disk brw-rw---- 0 512 0 512 512 1 cfq /
sles4sap12sp4:~ # mkdir /etc/tuned/sap-hana/
sles4sap12sp4:~ # cp /usr/lib/tuned/sap-hana/tuned.conf /etc/tuned/sap-hana/tuned.conf
sles4sap12sp4:~ # vi /etc/tuned/sap-hana/tuned.conf
sles4sap12sp4:~ # cat /etc/tuned/sap-hana/tuned.conf
#
# basic tuned configuration for SAP NetWeaver, SAP HANA and HANA based products.
# Additional parameters are tuned by script.sh
# For a brief explanation of the parameters, please have a look at the end of
# the central sapconf configuration file /etc/sysconfig/sapconf
#
[main]
summary=Optimize for SAP NetWeaver, SAP HANA and HANA based products
[cpu]
#governor = performance
#energy_perf_bias = performance
#min_perf_pct = 100
force_latency = 70
[disk]
elevator = noop
[script]
script = /usr/lib/tuned/sap-hana/script.sh
sles4sap12sp4:~ # tuned-adm profile sap-hana
sles4sap12sp4:~ # lsblk -o 'NAME,KNAME,MAJ:MIN,FSTYPE,LABEL,RO,RM,MODEL,SIZE,OWNER,GROUP,MODE,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,MOUNTPOINT'
NAME KNAME MAJ:MIN FSTYPE LABEL RO RM MODEL SIZE OWNER GROUP MODE ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED MOUNTPOINT
sda sda 8:0 0 0 Virtual disk 50G root disk brw-rw---- 0 512 0 512 512 1 noop
├─sda1 sda1 8:1 swap 0 0 2G root disk brw-rw---- 0 512 0 512 512 1 noop [SWAP]
└─sda2 sda2 8:2 btrfs 0 0 48G root disk brw-rw---- 0 512 0 512 512 1 noop /
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.