Thursday, February 21, 2008

Setting Shared Memory under Solaris10

Under Solaris 10, setting up shared memory is no longer under /etc/system. The new way is using projadd.
Details are as follows:
# review the current content of the project file at /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
# to backup the project file
cp -p /etc/project /etc/project.pkgorig
# to create a project named “user.sybase”
projadd -c “Sybase ASE” ‘user.sybase’
# to elevate SHMMAX for the newly created project
projmod -s -K “project.max-shm-memory=(privileged,3.6GB,deny)” ‘user.sybase’
# the resultant project file
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
user.sybase:100:Sybase ASE:::project.max-shm-memory=(privileged,3865470566,deny)
# to verify the params before and after the tuning. dump prctl as user ’sybase’. To relogin as sybase is needed to see changes effective w/o a reboot.
$ prctl -i process $$ > prctl-after-tuning
$ diff prctl-defautls prctl-after-tuning
1c1
<> process: 1868: -sh
28c28
<> basic 8.00MB - deny 186851c51
<> privileged 3.60GB - deny -
As you can see, now user ’sybase’ has 3.60GB as SHMMAX. instead of the default 1001MB.
Needless to say the procedure described above can be followed to set SHMMAX using projadd for other enterprise RDBMS such as Oracle, InfoMax, and Progress.

No comments: