Closed jeffaco closed 6 years ago
I have no problem with applying optimizations where we know there is no adverse effect. We can put a service in place that runs saptune for which solution would you like the tune settings applied?
All solutions (* denotes enabled solution): BOBJ HANA MAXDB NETWEAVER S4HANA-APPSERVER S4HANA-DBSERVER SAP-ASE
Please understand that there is most likely an adverse performance effect if we choose S4HANA-APPSERVER but the customer sets the system up for a S4HANA-DBSERVER. Of course we can also add this to the YAML and let the customer decide ahead of time when they request the provisioning.
The stuff in /etc/init.d/boot.local is questionable as far as reliability of execution is concerned. /etc/init.d/boot.local is a carry over from SystemV init and systemd, while still supposed to run the script, has not always been reliable in doing so. We should make the settings either permanent in other ways or create a native systemd service.
I'm meeting with our folks that do the actual optimization early next week. At that point I should be able to get concise information of EXACTLY what we do. I'll relay back once I have that, thanks.
Sounds good
@jeffaco do you have any further information on this topic ?
some tuning in terms of kernel module parameters has already been done by Robert. So maybe this one is already done regarding the generic settings we can apply ?
@schaefi I think we will want a azure-li-performance-tune service in any event, at the very least it would run:
cpupower frequency-set -g performance
cpupower set -b 0
echo 0 > /sys/kernel/mm/ksm/ru
We can then add the handling of the tuning to this service if needed or we can run saptune in the image build if a specific profile is desired.
I met with operations to discuss optimizations, finally. A number of things came out. Note: the PMs may not be giving optimal ways to make changes, this is just what they do.
Currently, while we have a mechanism to install RPMs, they are RPMs that we provide. We have a list of packages that need to be installed on the system (generally specified by SAP). Can I give you this list for the image build step? I don't think the YAML could do it because we don't have access to repositories at that point.
We do a saptune daemon start
, which sets up a UUID daemon. This must be set to start automatically via systemctl
.
We do a number of saptune operations for optimization for HANA:
root # saptune solution apply HANA
root # zypper install sapconf
root # tuned-adm profile sap-hana
root # systemctl start tuned
root # systemctl enable tuned
We disable autoNUMA via grub by appending numa_balancing=disable
to GRUB_CMDLINE_LINUX_DEFAULT
entry in /etc/default/grub
. We also disable numa_balancing
in YaST2 bootloader (Optional Commandline Parameters
in Kernal Parameters
.
We disable transparent hugepages:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
transparent_hugepage=never
to line GRUB_CMDLINE_LINUX_DEFAULT
in /etc/default/grub
.echo never > /sys/kernel/mm/transparent_hugepage/enabled
transparent_hugepage=never
to line GRUB_CMDLINE_LINUX_DEFAULT
in /etc/default/grub
.CPU Frequency/Voltage scaling: add cpupower frequency-set -g performance
to /etc/init.d/boot.local
.
Energy Performance Bias:
cpupower set -b 0
to /etc/init.d/boot.local
.Kernel samepage merging (KSM): Add echo 0 > /sys/kernel/mm/ksm/run
to /etc/inid.d/boot.local
.
Disable EDAC, both LI and VLI do that in hardware.
I can't think of a good way to relay this. I don't want to open an issue for each item, but maybe that's the right thing? Suggestions appreciated. Note that some of this may already be done.
Can I give you this list for the image build step?
sure but I think we have mostly all included: patterns-sap-hana, saptune, tuned, sapconf. Others mentioned here: tuned-adm, sap-hana I have not in the suse repos
We do a number of saptune operations
Added #52
We disable autoNUMA We disable transparent hugepages: Configure C-States for lower latency in Linux
already done in the image via kernel cmdline options
Energy Performance Bias
Added #53
Kernel samepage merging
Added #54
Disable EDAC, both LI and VLI do that in hardware
@jeffaco How did you do that ? specific module setup in modprobe.d ?
As for disabling EDAC, here's the information I have from our PM (also went via E-Mail):
Open the file /etc/modprobe.d/blacklist.conf
# vi /etc/modprobe.d/blacklist.conf
#install edac_core /bin/false
#install sb_edac /bin/false
Once remove those lines save the file and exit.
Execute below command
# dracut -f
# Then reboot the server and confirm edac modules are loaded by executing below command
# reboot
# lsmod | grep edac
Let me know if you need further information, thanks.
Thanks, that's easy. I'll catch this setup as part of the image description itself
ok, both image build projects for Li and VLi has been adapted to perform the required blacklist.conf changes.
This completes the issue. Thanks much for the details
I've been looking into verification tests that we run since this project is rapidly wrapping up for LI. After investigation, there are some issues.
In brief conversations with @rjschwei earlier, he's hesitant to optimize the system in any way since "perfect" optimizations are often load dependent and thus should be performed by the customer. While that sounds good in theory, we seem to be missing some optimizations that I consider pretty basic.
For example:
We currently have some settings via
saptune
(this seems to be a SUSE-specific thing; I never heard of that before).saptune
is installed but not running or configured for HANA on our system.We have some settings in
/etc/init.d/boot.local
, like:Seems reasonable enough to if CPU set for performance, for example, rather than power efficiency.
/proc/cmdline
, which I imagine had to come from SAP OSS notes:I'm still picking up what I need to know about image verification, so there may be other items.
Despite what @rjschwei had to say, this sort of stuff seems pretty basic. I would very much like to see images come this way (rather than writing a script, executed through YAML, that make the appropriate changes).
What say ye?