Subscribe to Posts by Email

Subscriber Count

    696

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

Unix : Solaris psrset – bound cpu to specific processes

Using psrset, we can assign specific cpu's as a group and assign specific processes to that processor set. This is useful in RAC where there node evictions due to CPU scheduling delays or CPU bottlenecks are high, we can assign the critical process like cssd, crsd, ohasd etc, so that CPU is always available to the clusterware processes.

Here is the documentation excerpt for psrset command

The psrset utility controls the management of processor sets. Processor sets allow the binding of processes or LWPs to groups of processors, rather than just a single processor. Processors assigned to processor sets can run only LWPs that have been bound to that processor set.

For example in a RAC cluster, on node 1 create a processor set and assign the critical process to that processor set.

On Node 1:

	$ psrset -c 2
	successfully created pset 1
	successfully assigned processor 2 to pset 1

	$ psrset -a 1 2
	successfully assigned processor 2 to pset 1

	$ ps -fu root | grep -i grid
	    root  6547     1  0  Jan 13  ?        49:09 /home/oracle/product/11.2.0/grid/bin/cssdagent
	    root  6647     1  0  Jan 13  ?        487:44 /home/oracle/product/11.2.0/grid/bin/crsd.bin reboot
	    root  6553     1  0  Jan 13  ?        1633:50 /home/oracle/product/11.2.0/grid/bin/orarootagent.bin
	    root  4696     1  0  Jan 13  ?        486:50 /home/oracle/product/11.2.0/grid/bin/ohasd.bin reboot
	    root  6542     1  0  Jan 13  ?        49:54 /home/oracle/product/11.2.0/grid/bin/cssdmonitor
	    root  6847     1  0  Jan 13  ?        907:03 /home/oracle/product/11.2.0/grid/bin/orarootagent.bin
	    root  6643     1  0  Jan 13  ?        414:05 /home/oracle/product/11.2.0/grid/bin/octssd.bin reboot
 
	$ psrset -b 1 6643 6847 6542 4696 6553 6647 6547
	successfully bound pid 6643 to pset 1
	successfully bound pid 6847 to pset 1
	successfully bound pid 6542 to pset 1
	successfully bound pid 4696 to pset 1
	successfully bound pid 6553 to pset 1
	successfully bound pid 6647 to pset 1
	successfully bound pid 6547 to pset 1

Similarly, On Node 2:

 
	$ psrset -c 2
	successfully created pset 1
	successfully assigned processor 2 to pset 1

	$ psrset -a 1 2
	successfully assigned processor 2 to pset 1

	$ ps -fu root | grep -i grid
	    root 12165     1  0  Jan 10  ?        725:48 /home/oracle/product/11.2.0/grid/bin/crsd.bin reboot
	    root 12248     1  0  Jan 10  ?        962:46 /home/oracle/product/11.2.0/grid/bin/orarootagent.bin
	    root 12080     1  0  Jan 10  ?        1865:43 /home/oracle/product/11.2.0/grid/bin/orarootagent.bin
	    root 11975     1  0  Jan 10  ?        613:11 /home/oracle/product/11.2.0/grid/bin/ohasd.bin reboot
	   root 12161     1  0  Jan 10  ?        467:22 /home/oracle/product/11.2.0/grid/bin/octssd.bin reboot
	    root 12072     1  0  Jan 10  ?        79:46 /home/oracle/product/11.2.0/grid/bin/cssdmonitor
	    root 12074     1  0  Jan 10  ?        82:59 /home/oracle/product/11.2.0/grid/bin/cssdagent

	$ psrset -b 1 12165 12248 12080 11975 12161 12072 12074

	successfully bound pid 12165 to pset 1
	successfully bound pid 12248 to pset 1
	successfully bound pid 12080 to pset 1
	successfully bound pid 11975 to pset 1
	successfully bound pid 12161 to pset 1
	successfully bound pid 12072 to pset 1
	successfully bound pid 12074 to pset 1

Comments are closed.