To check for and apply the best practice recommendations simply execute the ps_saphana_cfg_check utility as root.
The ps_saphana_cfg_check utility will identify the operating system vendor, major and minor revision levels in order to apply the appropriate best practices for the platform. Configuration settings for multiple components are taken from the /opt/purestorage/saphana_toolkit/cfg_files/ directory.
These configuration settings should only be used for SAP HANA based deployments.
Configuration Files
/opt/purestorage/saphana_toolkit/cfg_files/configurations.json
This file contains the preset configuration recommendations for each of the operating systems which support SAP HANA. Present configurations are formatted as follows:
|
vendor |
The operating system vendor , either "suse" or "redhat" |
|
distribution |
the operating system distribution typically "sles" or "enterprise_linux" |
|
major |
The major revision of the distribution |
|
minor |
The minor revision of the distribution |
|
dm_blk_mq |
Should the blk_mq elevator be turned on for multipath devices, or if it is already on by default. |
|
scsi_blk_mq |
Should the blk_mq elevator be turned on for scsi devices, or if it is already on by default. |
|
scheduler |
What ths the recommended IO scheduler to use for Everpure FlashArray volumes |
|
mpathconf |
What device-mapper configuration settings to use. References existing files. |
RedHat 7 and SuSe 12
For the following configurations, the recommended Queue Settings with udev is listed below:
-
Redhat Enterprise Linux 7.x - /opt/purestorage/saphana_toolkit/cfg_files/rh7
-
SUSE Enterprise Linux 12.x - /opt/purestorage/saphana_toolkit/cfg_files/sl12
RHEL 6.x, 7.x
After applying the following changes, you can expect to see these settings take effect for your sd* devices, but dm-* devices do not reflect these changes directly because dm-* devices inherit such settings from the sd* devices that make up its path.
# Recommended settings for Pure Storage FlashArray.
# Use noop scheduler for high-performance solid-state storage
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/scheduler}="noop"
# Reduce CPU overhead due to entropy collection
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/add_random}="0"
# Spread CPU load by redirecting completions to originating CPU
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", ATTR{queue/rq_affinity}="2"
# Set the HBA timeout to 60 seconds
ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{model}=="FlashArray ", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/device/timeout'"
RHEL 8 and SuSe 15
For the following configurations, the recommended Queue Settings with udev is listed below:
-
Redhat Enterprise Linux 8.x - /opt/purestorage/saphana_toolkit/cfg_files/rh8
-
SUSE Enterprise Linux 15.x - /opt/purestorage/saphana_toolkit/cfg_files/sl15
-
Rule 1: The first rule applies to SCSI devices that show up in the
/dev/sddevice table. -
Rule 2: The second rule applies to multi-path devices that show up in the
/dev/dmdevice table.
# Recommended settings for Pure Storage FlashArray.
# Use none scheduler for high-performance solid-state storage for SCSI devices
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", OPTIONS="nowatch", ATTR{queue/scheduler}="none"
ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", OPTIONS="nowatch", ATTR{queue/scheduler}="none"
# Reduce CPU overhead due to entropy collection
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", OPTIONS="nowatch", ATTR{queue/add_random}="0"
ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", OPTIONS="nowatch", ATTR{queue/add_random}="0"
# Spread CPU load by redirecting completions to originating CPU
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", OPTIONS="nowatch", ATTR{queue/rq_affinity}="2"
ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", OPTIONS="nowatch", ATTR{queue/rq_affinity}="2"
# Set the HBA timeout to 60 seconds
ACTION=="add|change", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{ID_VENDOR}=="PURE", OPTIONS="nowatch", ATTR{device/timeout}="60"
# You can have Linux apply the rules by reloading the UDEV rules and then triggering Linux to apply them immediately.
/sbin/udevadm control –-reload-rules
/sbin/udevadm trigger –-type=devices --action=change
Go here for more information on Queue Settings.
Applying best practice recommendations
Depending on if the system is identified to be a virtual machine or a bare metal server – different settings are applied.
- If the system is a virtual machine , then device-mapper and udev rules are not set – instead the IO scheduler and global elevator is set for the bootloader (reboot required).
- If the system is bare metal then the appropriate device-mapper configuration and udev settings are applied , along with the IO scheduler (IO scheduler changes require a reboot).
- It also checks if the required settings are present so as to avoid unnecessary changes.
To run the configuration check execute the following:
ps_saphana_cfg_checkThis is an example of the configuration check being run on a system. The following changes are checked for , prompted for and changed:
- IO Scheduler changed for SCSI devices.
- IO scheduler changes for Device-Mapper devices.
- Multipath and udev (device rules) configurations applied.
- Due to an IO scheduler change the bootloader is rebuilt and the user prompted for a reboot.
For device-mapper configuration changes only the section pertaining to Pure Storrage FlashArray is changed.
|
Before |
After |
|
|