You know there are a lot of parameters to be configured to meet the pre-requisites demanded by the installation guides of SAP. It requires also a lot of reading the different documentations found in various SAP Notes.

What if there was something that could help you in fulfilling this task automatically? Well you do not have to go far: The solution is the sapconf package available on SLES.

Simply install the sapconf package via:

# zypper in sapconf.

Or use the YaST software management to install the sapconf package:

sapconf does the following jobs for you:

Calculating and setting of Linux kernel parameters

Some Linux kernel parameters have to be adjusted to meet the requirements of SAP software. These values are calculated, depending on the virtual memory. The virtual memory size (VSZ) is calculated from the physical RAM and the swap size. In addition, the configured size of the memory (PSZ) pages are taken into account.

Based on the information in SAP Note 941735, the following values are calculated:

Afterwards it is checked whether the current system settings match at least these values. If the system settings are too low, the calculated values get applied. This is done by writing them, together with some other presets from /etc/sysconfig/sapconf, to /etc/sysctl.conf.

Setting Process resource limits

Some components (e.g. the SAP J2EE engine, Oracle RDBMS software, …) need to keep a large number of file handles opened simultaneously. Hence the limit of files one process can open at a time needs to be increased. This is done via sapconf by appending the following to /etc/security/limits.conf:

These lines grant the users in the sapsys group (J2EE engine) and the (s)dba group (Oracle) to open up to 32800 files simultaneously, you need to logout and login again for the setting to take effect (Changing the user via “su” is not sufficient).

Attention, there is only one soft and one hard setting for nofile per user. If a user is in more than one of the above groups the nofile limits can overwrite each other. Hence it is advised to make sure that all groups specified have the same nofile setting.

The default setting of 32800 should be sufficient for most systems. However, if you get error messages like e.g.:

kernel: open files rlimit 32800 reached for uid 1234 pid 5678

in /var/log/messages, you need to increase this number.

Just be careful to not exceed the total limit of open files for your system. Otherwise you will get error messages like:

kernel: VFS: file-max limit 252410 reached

in /var/log/messages. You then need to modify the fs.file-max parameter as described in the file: “/usr/src/linux/Documentation/filesystems/proc.txt” from the linux kernel sources, below the heading: file-nr and file-max

You can adjust the sapconf settings by modifying the following configuration file:

/etc/sysconfig/sapconf

This configuration file is available after the installation of the “sapconf” package.

The file “/etc/sysconfig/sapconf” can be edited via YaST through the menu:

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up). It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.