0% found this document useful (0 votes)
158 views7 pages

Solaris Resource Controls - Oracle DB Project - Solaris 11.4

Uploaded by

Aqeel Nawaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views7 pages

Solaris Resource Controls - Oracle DB Project - Solaris 11.4

Uploaded by

Aqeel Nawaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

2/1/24, 11:19 AM Solaris Resource Controls - Oracle DB project - solaris... wtf?!?

Solaris Resource Controls – Oracle DB project

Last time I had to explain what this solaris project for oracle DBs means per line and why it is set. The better question
was – how can you see the usage if you have to increase the limit – again, per entry… I tried to write it together and
want to share my findings. If you have any more input I am open to share it.

Looking into that Oracle database project, running on a SuperCluster Solaris 11.4

user.oracle
projid : 105
comment: ""
users : (none)
groups : (none)
attribs: process.max-core-size=(privileged,1073741824,deny)
process.max-file-descriptor=(basic,65536,deny)
process.max-sem-nsems=(privileged,2048,deny)
process.max-sem-ops=(privileged,1024,deny)
process.max-stack-size=(basic,33554432,deny)
project.max-msg-ids=(privileged,4096,deny)
project.max-sem-ids=(privileged,65535,deny)
project.max-shm-ids=(privileged,4096,deny)
project.max-shm-memory=(privileged,2199023255552,deny)

Let's try to look into these settings what they mean, defaults, Sol10vs11, Oracle RDBMS docu, OCS recommendations
and usage:

Contents
1 max-file-descriptor
2 max-sem-nsems
3 max-sem-ops
4 max-stack-size
5 max-msg-ids
6 max-sem-ids
7 max-shm-ids
8 max-core-size
9 max-shm-memory

max-file-descriptor

https://www.solaris.wtf/blog/solaris-resource-controls-oracle-db-project/ 1/7
2/1/24, 11:19 AM Solaris Resource Controls - Oracle DB project - solaris... wtf?!?

process.max-file-descriptor Maximum number of open files per process


OLD = rlim_fd_max rlim_fd_cur

Oracle RDBMS Installation Minimum Value = soft 1024 / hard 65536


Solaris 10 Default = basic 256
Solaris 11.4 Default = basic 256
OSC Setting = basic 65536

CHECK setting

root # prctl -n process.max-file-descriptor -i process $$


process: 21663: -bash
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
process.max-file-descriptor
basic 256 - deny -
privileged 65.5K - deny -
system 2.15G max deny -
root # ulimit -n
256
root #

CHECK usage

root # echo ::kmastat | mdb -k | grep file_cache


file_cache 72 26298 36848 2695168B 95753345327 0
root #

In this example, 26298 is the number of file descriptors in use and 36848 the number of allocated file descriptors. Note
that in Solaris, there is no maximum open file descriptors setting for the system, only a single process might have open.
They are allocated on demand as long as there is free RAM available.

max-sem-nsems

process.max-sem-nsems Maximum number of semaphoren


OLD = seminfo_semmsl

Oracle RDBMS Minimum Value = 256


Solaris 10 Default = 25
Solaris 11.4 Default = 512
OSC Setting = 2048

CHECK setting

# prctl -n process.max-sem-nsems -i process $$


oracle:~$ prctl -n process.max-sem-nsems -i process $$
process: 22738: -bash

https://www.solaris.wtf/blog/solaris-resource-controls-oracle-db-project/ 2/7
2/1/24, 11:19 AM Solaris Resource Controls - Oracle DB project - solaris... wtf?!?
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
process.max-sem-nsems
privileged 2.05K - deny -
system 32.8K max deny -
oracle:~$

CHECK how many NSEMS are used:

# ipcs -sb | awk '/^s/ {SUM+=$NF}END{print SUM}'

max-sem-ops

process.max-sem-ops Maximum number of System V semaphore operations


OLD = seminfo_semopm

Oracle RDBMS Installation Minimum Value = N/A


Solaris 10 = 10
Solaris 11.4 Default = 512
OSC Setting = 1024

CHECK ? Good question, could not find how to check the current usage; documentation says that the application
should get errorsr; eturn code of E2BIG from a semop() call...

max-stack-size

process.max-stack-size Maximum stack memory segment available to this process.


OLD = "combination of different kernel settings let to it or ulimit command (eg.:
lwp_default_stksize, rlim_fd_cur)"
Oracle RDBMS Installation Minimum Value = soft 10240 / hard 32768
Solaris 10 Default = 8192
Solaris 11.4 Default = 8192
OSC Setting = 33554432

CHECK settings

https://www.solaris.wtf/blog/solaris-resource-controls-oracle-db-project/ 3/7
2/1/24, 11:19 AM Solaris Resource Controls - Oracle DB project - solaris... wtf?!?

oracle:~$ ulimit -s
32768
oracle:~$ prctl -n process.max-stack-size -i process $$
process: 24517: -bash
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
process.max-stack-size
basic 32.0MB - deny -
privileged 8.00EB max deny -
system 8.00EB max deny -
oracle-@C01SC1C0L01Z01A:~$ ulimit -sS

CHECK per process That could be logged by:

# rctladm -e syslog process.max-stack-size

Could be looked up by:

# pmap -sx PID

OR - found a dtrace script (Doc ID 2275236.1):

# dtrace -qn '


grow_internal:entry{self->trace=1;self->addr=arg0}
grow_internal:return/self->trace && arg1==12/
{printf("pid:%d %s stack_addr:%a fault_addr:%a\n",
pid,execname,curthread->t_procp->p_usrstack,self->addr);
self->trace=0;self->addr=0;}
grow_internal:return/self->trace/{self->trace=0;self->addr=0}'

The below example shows the process caused a pagefault at 0x0. The size of stack growth is the different between the
fault address and the current stack address, which is 0xffc00000 - 0x0 ~= 3.99GB while the process.max-stack-size is
8MB.

# dtrace <... snip for brevity...>


pid:6672 fwrxmldiff stack_addr:0xffc00000 fault_addr:0x0

# tail -1 /var/adm/messages
Jun 9 06:56:26 hostname genunix: [ID 500092 kern.notice] basic rctl process.max-
stack-size (value 8388608) exceeded by process 6672.

max-msg-ids

project.max-msg-ids maximum number of message queues that can be created


OLD = msgsys:msginfo_msgmni
Oracle RDBMS Installation Minimum Value = 100

https://www.solaris.wtf/blog/solaris-resource-controls-oracle-db-project/ 4/7
2/1/24, 11:19 AM Solaris Resource Controls - Oracle DB project - solaris... wtf?!?
Solaris 10 Default = 50
Solaris 11.4 Default = 128
OSC Setting = 4096

CHECK: check the number of active message queues

# ipcs -q

Seen Errors

Failure to create message queue .. msgget: No space left on device

max-sem-ids

project.max-sem-ids Maximum number of semaphore identifiers


OLD = seminfo_semmni
Oracle RDBMS Installation Minimum Value = 100
Solaris 10 Default = 10
Solaris 11.4 Default = 128
OSC Setting = 65535

CHECK: You can see the identifier for the facility entry using ipcs -s; i.m.a.o. the current usage should be seen with:

# ipcs -sZ | grep -c ^s

max-shm-ids

project.max-shm-ids limit on number of shared memory segments that can be


created
OLD = shminfo_shmmni
Oracle RDBMS Installation Minimum Value = 100
Solaris 10 Default = 100

https://www.solaris.wtf/blog/solaris-resource-controls-oracle-db-project/ 5/7
2/1/24, 11:19 AM Solaris Resource Controls - Oracle DB project - solaris... wtf?!?
Solaris 11.4 Default = 128
OSC Setting = 4096

CHECK

# ipcs -b
# ipcs -bZ | grep -c ^m

max-core-size

process.max-core-size Maximum size of a core file that is created by this process. Default is unlimited!

max-shm-memory

Last but not least the maximum shared memory itself. Default is 1/4 of physical Memory in Solaris 11.4 - i guess the
best to see the usage is mdb and its OSM section (optimized shared memory):

# echo "::memstat" | mdb -k


Usage Type/Subtype Pages Bytes %Tot %Tot/%Subt
---------------------------- ---------------- -------- ----- -----------
Kernel 11919848 90.9g 7.4%
Regular Kernel 10099567 77.0g 6.3%/84.7%
Defdump prealloc 1820281 13.8g 1.1%/15.2%
ZFS 2043159 15.5g 1.2%
User/Anon 141962499 1.0t 89.2%
Regular User/Anon 28686595 218.8g 18.0%/20.2%
OSM 113275904 864.2g 71.2%/79.7%
Exec and libs 327706 2.5g 0.2%
Page Cache 109770 857.5m 0.0%
Free (cachelist) 9321 72.8m 0.0%
Free 2618033 19.9g 1.6%
Total 158990336 1.1t 100%
#

BTW; never forget – you can always use “rctladm” to enable syslog for a lot of limits.

# rctladm -l
process.max-cpu-time syslog=off [ lowerable no-deny cpu-time inf seconds ]
process.max-file-size syslog=off [ lowerable deny file-size bytes ]
process.max-data-size syslog=off [ lowerable deny no-signal bytes ]

https://www.solaris.wtf/blog/solaris-resource-controls-oracle-db-project/ 6/7
2/1/24, 11:19 AM Solaris Resource Controls - Oracle DB project - solaris... wtf?!?
process.max-stack-size syslog=off [ lowerable deny no-signal bytes ]
process.max-core-size syslog=off [ lowerable deny no-signal bytes ]
process.max-file-descriptor syslog=off [ lowerable deny count ]
process.max-address-space syslog=off [ lowerable deny no-signal bytes ]
process.max-sem-nsems syslog=off [ deny count ]
process.max-sem-ops syslog=off [ deny count ]
process.max-msg-qbytes syslog=off [ deny bytes ]
process.max-msg-messages syslog=off [ deny count ]
process.max-port-events syslog=off [ deny count ]
process.max-itimers syslog=off [ deny count ]
process.max-sigqueue-size syslog=off [ lowerable deny count ]
process.max-deferred-posts syslog=off [ lowerable deny count ]
task.max-lwps syslog=off [ count ]
task.max-processes syslog=off [ count ]
task.max-cpu-time syslog=off [ no-deny cpu-time no-obs inf seconds ]
project.cpu-shares syslog=n/a [ no-basic no-deny no-signal no-syslog count ]
project.cpu-cap syslog=n/a [ no-basic deny no-signal inf no-syslog count ]
project.max-lwps syslog=off [ no-basic count ]
project.max-processes syslog=off [ no-basic count ]
project.max-tasks syslog=off [ no-basic count ]
project.max-sem-ids syslog=off [ no-basic deny count ]
project.max-msg-ids syslog=off [ no-basic deny count ]
project.max-shm-ids syslog=off [ no-basic deny count ]
project.max-shm-memory syslog=off [ no-basic deny bytes ]
project.max-mrp-ids syslog=off [ no-basic deny count ]
project.max-port-ids syslog=warning [ no-basic deny count ]
project.max-locked-memory syslog=off [ no-basic deny bytes ]
project.max-adi-metadata-memory syslog=off [ no-basic deny bytes ]
project.max-contracts syslog=off [ no-basic deny count ]
zone.cpu-shares syslog=n/a [ no-basic no-deny no-signal no-syslog count ]
zone.cpu-cap syslog=n/a [ no-basic deny no-signal inf no-syslog count ]
zone.max-lwps syslog=off [ no-basic count ]
zone.max-processes syslog=off [ no-basic count ]
zone.max-msg-ids syslog=off [ no-basic deny count ]
zone.max-sem-ids syslog=off [ no-basic deny count ]
zone.max-shm-ids syslog=off [ no-basic deny count ]
zone.max-shm-memory syslog=off [ no-basic deny bytes ]
zone.max-mrp-ids syslog=off [ no-basic deny count ]
zone.max-locked-memory syslog=off [ no-basic deny bytes ]
zone.max-adi-metadata-memory syslog=off [ no-basic deny bytes ]
zone.max-swap syslog=off [ no-basic deny bytes ]
zone.max-lofi syslog=off [ no-basic deny count ]
#

https://www.solaris.wtf/blog/solaris-resource-controls-oracle-db-project/ 7/7

You might also like