Friday Mar 30, 2007
Friday Mar 30, 2007
Changing and setting OS or process parameters for an SAP system on Solaris has never been easier and more flexible than with Solaris 10: Instead of having to reboot your server after changing OS parameters in file /etc/system, just set up projects, assign users to those projects, and (re)start the processes for these users. Or even change the settings for running processes!
Here's how it all works: According to SAP note 724713 and Sun Info Doc 88934, four resource controls have to be set for SAP systems running on Solaris 10 (instead of more than 10 for previous Solaris releases). Only one parameter has to remain in /etc/system:
set rlim_fd_cur=8192
Next step is to decide what you want to use your projects for: Do you want to set limits for your database and your application instance(s) separately? Do you want to configure processor sets for each of your projects? Or do you want to limit usage of physical memory per project?
You can find explanations and examples for all of the above in the System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.
Let's assume you would like to do a quick start and just use the simplest possible configuration (one project for database and SAP application instance), and let's assume your SAP system has the id "DEV". Then, the following commands would set your resource controls appropriately:
$ projadd -p 101 -c "SAP System DEV" -U devadm,oradev \
-K "project.max-sem-ids=(priv,1024,deny)" \
-K "process.max-sem-nsems=(priv,2048,deny)" \
-K "project.max-shm-ids=(priv,256,deny)" \
-K "project.max-shm-memory=(priv,18446744073709551615,deny)" \
DEVNext step is to add those two users to your /etc/user_attr file so that they get a default project assigned:
$ ksh(no need to switch to ksh if you like the "wrong apostrophes" better than $(<command>) ;-) )
$ cp -pi /etc/user_attr /etc/user_attr.$(date +%Y%m%d-%H%M%S)(Backing up or printing system configuration files before changing them manually is always a good idea)
$ cat >> /etc/user_attr devadm::::project=DEV oradev::::project=DEV <ctrl>d
Done. Now check if the settings are OK:
$ projects -d devadm
DEV
$ projects -l $(projects -d devadm)
DEV
projid : 101
comment: "SAP System DEV"
users : devadm
oradev
groups : (none)
attribs: process.max-sem-nsems=(priv,2048,deny)
project.max-sem-ids=(priv,1024,deny)
project.max-shm-ids=(priv,256,deny)
project.max-shm-memory=(priv,18446744073709551615,deny)
Everything's fine, so now you can start your SAP installation! (Before you ask: I always add the required groups and users by using groupadd and useradd before starting the SAP installer.)
Posted by Cheryl Siebert on June 08, 2007 at 01:22 AM CEST #
Posted by Bernd Finger on June 21, 2007 at 01:00 PM CEST #
Just wondering why you're setting shared memory max to 18 trillion GB? Is that valid?
Posted by Steve on May 13, 2008 at 01:40 AM CEST #
(Happened to notice the unanswered question from Steve and thought I'd oblige): this value is the largest (decimal) value that can be stored in a 64-bit address space (equivalent to 0xFFFFFFFFFFFFFFFF in hex); used as the default to essentially allow your physical/available RAM capacity to become the constraint.
Posted by Scott Livezey on November 05, 2009 at 10:04 PM CET #