Find it

Thursday, June 3, 2010

Modify number of CPUs from a pool/pset while it is running

Sometimes you need to modify number of CPU's for a perticular pool. In this case you only need to transfer #CPUs from the pset pset_default to the pset of your pool.

In my case I've two psets available with me -

# poolcfg -dc info

[... Long Lines of Output ...]

pset oracle_pset
                       int pset.sys_id 1
                       boolean pset.default false
                       uint pset.min 4
                       uint pset.max 4
                       string pset.units population
                       uint pset.load 5563
                       uint pset.size 4
                       string pset.comment

pset pset_default
                        int pset.sys_id -1
                        boolean pset.default true
                        uint pset.min 1
                        uint pset.max 65536
                        string pset.units population
                        uint pset.load 574
                        uint pset.size 12
                        string pset.comment


[... Long Lines of Output ...]

So here you can see that I've 2 processor sets named oracle_pset having 4 CPUs & pset_default having 12 CPUs. Now the situation is, application/DB demands more CPU capacity than currently I have. So in this case you can modify number of CPUs from running pool/pset.

Here is a method to do so -

Save you current configuration

# pooladm -s

Modify the CPU's using "-d" - -d operates directly on the kernel state.

# poolcfg -dc 'modify pset oracle_pset ( uint pset.min = 6 ; uint pset.max = 6)'

Transfer 2 CPUs from pset_default to oracle_pset

# poolcfg -dc 'transfer 2 from pset pset_default to oracle_pset' OR if you want a specific processor then - # poolcfg -dc 'transfer to pset oracpu_pset ( cpu 5)'

Update the configuration in /etc/pooladm.conf file.

# pooladm -c

# poolcfg -dc info

[... Long Lines of Output ...]


pset oracpu_pset


                          int pset.sys_id 1
                          boolean pset.default false
                          uint pset.min 6
                          uint pset.max 6
                          string pset.units population
                          uint pset.load 2009
                          uint pset.size 6
                         string pset.comment


pset pset_default


                          int pset.sys_id -1
                          boolean pset.default true
                          uint pset.min 1
                          uint pset.max 65536
                          string pset.units population
                          uint pset.load 498
                          uint pset.size 10
                          string pset.comment


[... Long Lines of Output ...]

Runtime example –

$vmstat 5
kthr memory page disk faults cpu

r b w swap free re mf pi po fr de sr sd sd sd sd in sy cs us sy id0 0 0 36536976 6040672 244 1343 0 0 0 0 0 0 0 0 0 1105 17598 1840 16 14 70
0 0 0 36529296 6040216 96 341 0 0 0 0 0 2 2 0 0 1034 12900 1268 13 8 79
0 0 0 36531896 6039864 367 1412 0 0 0 0 0 0 0 0 0 1145 33910 1625 16 15 69

processors removed: 4, 5
3 0 0 39565360 8833624 597 2343 0 0 0 0 0 7 7 0 0 1379 33522 5416 24 14 62
0 0 0 36533816 6040080 516 1999 0 0 0 0 0 0 1 0 0 823 15979 1893 21 17 62
7 0 0 36500632 6013496 788 4785 0 0 0 0 0 3 3 0 0 1029 69589 1848 37 24 39
16 0 0 36370632 5920912 2258 14106 0 0 0 0 0 3 6 0 0 1819 165593 3616 62 38 0
15 0 0 36466944 5978160 911 4854 0 0 0 0 0 9 9 0 0 2095 298114 3968 67 32 0
8 0 0 36579424 6058944 511 3664 0 0 0 0 0 0 0 0 0 1690 238234 4102 57 30 13
processors added: 4, 5
[see the perfromance boost up, look at processor idle]
3 0 0 39565240 8833520 626 2467 0 0 0 0 0 7 7 0 0 9437 34315 7514 16 11 73
1 0 0 36645344 6103968 163 630 0 0 0 0 0 0 0 0 0 1243 14485 1989 15 9 76
1 0 0 36612504 6079352 205 1985 0 0 0 0 0 0 0 0 0 1393 86756 1705 28 15 57
0 0 0 36648152 6102368 199 1015 0 0 0 0 0 0 0 0 0 1247 17551 1909 18 10 72
0 0 0 36659264 6114368 46 672 0 0 0 0 0 6 6 0 0 1154 11101 1670 13 8 80
1 0 0 36668248 6118136 297 1124 0 0 0 0 0 2 1 0 0 1493 37868 3793 18 16 66
1 0 0 36674216 6121112 48 430 0 0 0 0 0 0 0 0 0 1268 12972 2075 14 9 77
2 0 0 36677736 6124456 317 1402 0 0 0 0 0 0 0 0 0 1414 18159 2336 17 10 73
1 0 0 36673120 6120576 365 1361 0 0 0 0 0 0 0 0 0 1360 17413 2494 14 10 75
1 0 0 36678104 6124032 217 713 0 0 0 0 0 1 1 0 0 1107 12223 1781 14 12 74

Hope this helps!

2 comments:

  1. thx so much for your detailed sharing!!!
    this's exactly what I'm looking for^+++++++++++++++++++^

    ReplyDelete
  2. i have two Processor Modules (PM) with a total of 4 CPUs. Each PM has 2 CPUs (2 CPUs with 8 cores and each cores with 8 hardware thread). I want to set my pset to have 128 vcpu. Is there a way i can identify which vcpu belong to which PM. If there is a way to identify that, how can i assign specific vcpu from the default pset to my pset? Because when i setup my pset, the system automcatically gave me vcpu id# from 0 to 127. Thanks in advanced for your helps!

    ReplyDelete