Workload and Resource Management
Showing results for 
Search instead for 
Do you mean 

PRM PSET to Limit CPU usage - Help

Advisor

PRM PSET to Limit CPU usage - Help

I have vPar on a Superdome2 that will be hosting HP9000 Containers.  For the containers that will be running Oracle databases, I need to use PRM PSET to limit the number of cpu's the container will use due to Oracle licensing.  I have configured PRM and created a PSET and have specified the particular container to only use one cpu.  When I login to the container and run "top", I see many cpu's not just one.  I suspected hyperthreading as the cpu model is an Intel Itanium 9350.  I then changed the /etc/prmconf and added "LCPU=OFF" to the specific test container like so:  testc1:PSET:::1::LCPU=OFF

 

I ran prmconfig -ie.  Then ran "psrset":  LCPU        OFF, LCPU is now off.  I ran "prmlist -p": 

 

PRM Group    PRMID       CPU Entitlement   LCPU Attr

testc1            131072    4.17%                     OFF              (1 cores - 88)

 

So to me it looks good.  I login to the container and run top, this is what I see:

 

Load averages: 0.06, 0.05, 0.05
29 processes: 19 sleeping, 10 running
Cpu states:
CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS
 0    0.00   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
82    0.23   8.9%   0.0%  27.7%  63.4%   0.0%   0.0%   0.0%   0.0%
83    0.05   2.0%   0.0%   1.0%  97.0%   0.0%   0.0%   0.0%   0.0%
84    0.53  77.2%   0.0%   4.0%  18.8%   0.0%   0.0%   0.0%   0.0%
85    0.10   5.9%   0.0%   3.0%  91.1%   0.0%   0.0%   0.0%   0.0%
86    0.40  17.8%   0.0%  36.6%  45.5%   0.0%   0.0%   0.0%   0.0%
87    0.08   5.9%   0.0%   4.0%  90.1%   0.0%   0.0%   0.0%   0.0%
88    0.04   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
90    0.03   0.0%   0.0%   2.0%  98.0%   0.0%   0.0%   0.0%   0.0%
91    0.04   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
92    0.00   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
94    0.01   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
96    0.01   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
98    0.00   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
100    0.00   0.0%   0.0%   2.0%  98.0%   0.0%   0.0%   0.0%   0.0%
102    0.01   0.0%   0.0%   4.0%  96.0%   0.0%   0.0%   0.0%   0.0%
104    0.01   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
106    0.01   0.0%   0.0%   2.0%  98.0%   0.0%   0.0%   0.0%   0.0%
108    0.01   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
110    0.01   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
112    0.01   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
114    0.01   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
116    0.01   5.0%   0.0%   3.0%  92.0%   0.0%   0.0%   0.0%   0.0%
118    0.01   1.0%   0.0%   1.0%  98.0%   0.0%   0.0%   0.0%   0.0%
120    0.00   0.0%   0.0%   0.0% 100.0%   0.0%   0.0%   0.0%   0.0%
122    0.01   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
124    0.01   0.0%   0.0%   1.0%  99.0%   0.0%   0.0%   0.0%   0.0%
126    0.01   0.0%   0.0%   2.0%  98.0%   0.0%   0.0%   0.0%   0.0%
---   ----  -----  -----  -----  -----  -----  -----  -----  -----
avg   0.06   4.9%   0.0%   3.9%  91.2%   0.0%   0.0%   0.0%   0.0%

Memory: 2126524K (1602712K) real, 4723008K (3592356K) virtual, 42658284K free  Page# 1/1

CPU TTY    PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND
88 pts/4  2461 root     178 20 47060K 37584K run      0:00 13.02  0.63 top
88   ?     415 root     152 20  1005M   161M run      1:18  0.49  0.49 java
88   ?   29986 root     154 20 24376K  7160K sleep    0:01  0.11  0.11 sendmail:
88   ?     336 root     154 20 23432K  6160K sleep    0:00  0.05  0.05 swagentd
88   ?     582 root      90 20 12076K  2916K sleep    0:00  0.05  0.04 sadc
88   ?     329 lp       154 20 23132K  6808K sleep    0:00  0.00  0.00 lpsched
88   ?     333 root     154 20 22768K  6392K sleep    0:00  0.00  0.00 cron
88   ?     379 root     152 20 25496K  5956K run      0:00  0.00  0.00 dsmcad
88   ?     390 root     158 20 10632K  2612K sleep    0:00  0.00  0.00 sh
88   ?     408 root     154 20 22680K  6344K sleep    0:00  0.00  0.00 prngd
88   ?     412 root     158 20 12188K  2836K sleep    0:00  0.00  0.00 sh
88   ?     501 root     152 20 30160K  8492K run      0:00  0.00  0.00 sshd:
88   ?     514 aholzgb  154 20 29892K  8476K sleep    0:00  0.00  0.00 sshd:
88 pts/4   522 aholzgb  158 20 12956K  2924K sleep    0:00  0.00  0.00 ksh
88 pts/4   538 root     158 20 10696K  2740K sleep    0:00  0.00  0.00 sh
88   ?     581 root     154 20 12244K  3328K sleep    0:00  0.00  0.00 sar
88   ?     610 root     168 20  4332K   468K sleep    0:00  0.00  0.00 vmstat
88   ?     786 root     154 20 23956K  6312K sleep    0:00  0.00  0.00 dtlogin
88   ?   29718 root     168 20 14324K  3712K sleep    0:00  0.00  0.00 srp_init
88   ?   29817 root     154 20 12096K  2868K sleep    0:00  0.00  0.00 syslogd
88   ?   29823 root     154 20 25976K  7368K sleep    0:00  0.00  0.00 sshd
88   ?   29833 root     154 20  6460K  1424K sleep    0:00  0.00  0.00 rpcbind
88   ?   29909 daemon   152 20 11272K  2596K run      0:00  0.00  0.00 rpc.statd
88   ?   29915 root     152 20  7316K   924K run      0:00  0.00  0.00 rpc.lockd
88   ?   29936 root     152 20  7308K   924K run      0:00  0.00  0.00 nfs4cbd
88   ?   29942 root     152 20  8032K  1772K run      0:00  0.00  0.00 nfsmapid
88   ?   29962 root     152 20 10364K  1724K run      0:00  0.00  0.00 automountd

 

Why am I not seeing only one cpu active?

4 REPLIES
Honored Contributor Honored Contributor

Re: PRM PSET to Limit CPU usage - Help

what is the output of:

 

srp -verbose -list <container name> | grep -i prm

 

is it showing as a PSET type? (I was under the impression you didn't fiddle with the prmconf file yourself and did it through the srp commands, but I haven't touched this in a long time!)


HTH

Duncan
Advisor

Re: PRM PSET to Limit CPU usage - Help

Duncan,

Here is the output to the command you requested.

srp -list testc1 -v | grep -i prm
Name: testc1  Template: hp9000sys Service: prm ID: 1
PRM Configuration (/etc/prmconf):
#!PRM_MEM:testc1:10::::
prm_cpu_shares=10
prm_cpu_max=
prm_mem_shares=10
prm_phys_mem=
prm_mem_max=
prm_cores=
prm_group_type=FSS
prm_group_name=

 

I manually edited the /etc/prmconf file and added LCPU=OFF to turn off hyperthreading to see if that was the cause.

I configured the PSET for 1 cpu using the "srp -replace testc1 -s prm" command.

testc1:PSET:::1::LCPU=OFF

 

 

Honored Contributor Honored Contributor

Re: PRM PSET to Limit CPU usage - Help

so shouldn't you have done:

 

srp -replace testc1 -s prm prm_cores=1 prm_group_type=PSET

 


HTH

Duncan
Highlighted
Advisor

Re: PRM PSET to Limit CPU usage - Help

I tried that with the same results, by providing more information in the command it ends up asking for less information.

I can see in the "top" output inside the container that there are two cpu cores in play.  When I turn off hyperthreading it reduces to just one core.

I guess it would be nice to know what Oracle runs to determine how many cpu cores the database is using.