Solaris Dynamic Pool Resource Capping With Examples

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Resource Capping available now

Note: It is now much simpler to configure caps in the most recent Solaris versions click here for an example

This document assumes your using Solaris 10 8/07(U4) or latter

CPU capping for zones

Make sure the pool demon is running

pgrep -l poold

Enable pools services (if not running)

svcadm enable pools
pooladm -e

Make sure the pool demon started
pgrep -l poold

Clean any old configuration if needed. Don’t do this on a system already ruining pools as it wipes out all old data)

pooladm -x

Save a clean pool before starting (for back-out purpose)

pooladm -s

Create a pool and set resource limits to it (CPU caps only – memory coming soon)
Example configuration file set to 16 CPU

cat pool-config-file
create pset apps-pset ( uint pset.min = 16; uint pset.max = 16 )
create pool apps-zone
associate pool apps-zone ( pset apps-pset )

Deploy the configuration file

poolcfg -f pool-config-file

OR run:
poolcfg -c
poolcfg -c 'create pset apps-pset ( uint pset.min = 16; uint pset.max = 16 )'
poolcfg -c 'create pool apps-zone'
poolcfg -c 'associate pool apps-zone ( pset apps-pset )'

Make the new system pool changes active

pooladm -c

Check the pool configuration

pooladm |less

Assign the capped pol to a zone

zonecfg -z apps set pool=apps-zone

Reboot the zone the first time this has changed
zoneadm -z apps init 6

  • To see the changes in the zone run psrinfo (you should only see 16CPU)

Memory capping for zones

To cap the memory for the total zone

zonecfg -z apps
add capped-memory
set physical=12g
set swap=6g

If you would like to change the shared memory capping needed for Oracle global on the zone
Note: This is not the recommended way of doing this – set it on project example (below)

(shmmni)
set max-shm-ids=100
(semmni)
set max-sem-ids=100

The recommended way to set memory capping for Oracle is per project in a zone

zlogin -C apps
Oracle shared memory settings
(semmni) project.max-sem-ids – 128 (100 recommended)
(semmsl) process.max-sem-nsems – 512 (256 recommended)
(shmmni) project.max-shm-ids – 128 (100 recommended)
Create Oracle project projadd user.oracle
Max shared Memory allowed for the Oracle user projmod -sK “project.max-shm-memory=(privileged,8GB,deny)” user.oracle
Other shared Memory settings
(semmni,semmsl,shmmni)
projmod -sK “project.max-sem-ids=(privileged,100,deny)” user.oracle

projmod -sK “process.max-sem-nsems=(privileged,256,deny)” user.oracle
projmod -sK “project.max-shm-ids=(privileged,100,deny)” user.oracle

To check if the memory settings are set correctly

su - oracle
prctl -n project.max-shm-memory $$

Memory capping settings coming soon

Make sure the pool demon is running

pgrep -l poold

Enable pools services (if not running)

svcadm enable pools
pooladm -e

Make sure the pool demon started
pgrep -l poold

Clean any old configuration if needed. Don’t do this on a system already ruining pools as it wipes out all old data)

pooladm -x

Save a clean pool before starting (for back-out purpose)

pooladm -s

Create a pool and set resource limits to it (CPU caps only – memory coming soon)
Example configuration file set to 16 CPU

cat pool-config-file
create pset psetapps-zone (uint pset.min = 1      ; uint pset.max = 1)
''' create mset msetapps-zone (uint mset.min = 12GB   ; uint mset.max = 12GB)'''
''' modify mset msetapps-zone (uint mset.minswap = 6GB; uint mset.maxswap = 6GB)'''
associate pool poolapps-zone (pset psetapps-zone ; '''mset msetapps-zone''')

cat pool-config-file

create pset psetapps-zone (uint pset.min = 1  ; uint pset.max = 1)

create mset msetapps-zone (uint mset.min = 12GB  ; uint mset.max = 12GB)
modify mset msetapps-zone (uint mset.minswap = 6GB; uint mset.maxswap = 6GB)
associate pool poolapps-zone (pset psetapps-zone ; mset msetapps-zone)

Deploy the configuration file

poolcfg -f pool-config-file

Make the new system pool changes active

pooladm -c

Check the pool configuration

pooladm |less

Resource capping Helpful Tips

To cap all memory in a zone to 50%

rcapadm -c 50

To set memory cap status run

rcapstat -g
rcapstat -g -z

To Chang a running zone to a specific pool settings

poolbind -p pool1 -i zoneid zone1

Leave a Reply

avatar
3000
  Subscribe  
Notify of