DevTech101

DevTech101

To add/remove CPU on a ruining zone (dedicated-cpu)

Note: To configure or modify shared resource pools click here

First get the pset name

  • in in this case the pset name is SUNWtmp_apps, notice the unit pset.min & pset.max is set to 4 cpu
pooladm
[..]snip
        pset SUNWtmp_apps
                int     pset.sys_id 1
                boolean pset.default false
                uint    pset.min 4
                uint    pset.max 4
                string  pset.units population
                uint    pset.load 100
                uint    pset.size 4
                string  pset.comment 
                boolean pset.temporary true
[..]snip

Note: if a pool was never configured just run pooladm -s

Before the change just 4 cpu are configured

[root@apps] / # psrinfo
0       on-line   since 06/20/2012 11:07:32
1       on-line   since 06/20/2012 11:07:35
2       on-line   since 06/20/2012 11:07:35
3       on-line   since 06/20/2012 11:07:35

To add/modify the numbers of CPU to 8

# Modify the number of CPU, Notice: the number 8
poolcfg -dc 'modify  pset SUNWtmp_apps ( uint pset.min = 8 ; uint pset.max = 8)'
 
# Activate the change
pooladm -c

After the change

[root@apps] / # psrinfo
0       on-line   since 06/20/2012 11:07:32
1       on-line   since 06/20/2012 11:07:35
2       on-line   since 06/20/2012 11:07:35
3       on-line   since 06/20/2012 11:07:35
4       on-line   since 06/20/2012 11:07:35
5       on-line   since 06/20/2012 11:07:35
6       on-line   since 06/20/2012 11:07:35
7       on-line   since 06/20/2012 11:07:35

To add/modify CPU on a ruining zone (capped-cpu)

Before the change

prctl -n zone.cpu-cap -i zone zone1
zone: 83: zone2
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.cpu-cap
        usage               1    
        privileged        400       -   deny                                 -
        system          4.29G     inf   deny                                 -
  • Change from 400 to 600
prctl -n zone.cpu-cap -v 600 -r -i zone zone1
  • After the change
prctl -n zone.cpu-cap -i zone zone1
zone: 83: zone2
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.cpu-cap
        usage               1    
        privileged        600       -   deny                                 -
        system          4.29G     inf   deny                                 -

To make the change permanent

zonecfg -z zone1
zonecfg:zone1> add capped-cpu
zonecfg:zone1:capped-cpu> set ncpus=2-4
zonecfg:zone1:capped-cpu> set importance=10
zonecfg:zone1:capped-cpu> end
zonecfg:zone1> verify; commit; exit
global# zoneadm -z zone1 reboot

To add/modify Memory on a ruining zone

Change increase physical memory (max-rss) to 12g

Before the change

zonestat -r physical-memory 2
Collecting data for first interval...
Interval: 1, Duration: 0:00:02
PHYSICAL-MEMORY              SYSTEM MEMORY
mem_default                           127G
                                ZONE  USED %USED   CAP  %CAP
                             [total] 38.0G 29.8%     -     -
                            [system] 22.2G 17.4%     -     -
                               apps2 12.9G 10.1% 16.0G 80.8%
                               apps3 2237M 1.71% 8192M 27.3%
                                apps 365M 0.27% 3072M 11.8%
                              global  342M 0.26%     -     -

Make the change

rcapadm -z cgnstgapp1 -m 12g

After the change

zonestat -r physical-memory 2
Collecting data for first interval...
Interval: 1, Duration: 0:00:02
PHYSICAL-MEMORY              SYSTEM MEMORY
mem_default                           127G
                                ZONE  USED %USED   CAP  %CAP
                             [total] 38.0G 29.8%     -     -
                            [system] 22.2G 17.4%     -     -
                               apps2 12.9G 10.1% 16.0G 80.9%
                               apps3 2235M 1.71% 12.0G 18.1%
                                apps 365M 0.27% 3072M 11.8%
                              global  342M 0.26%     -     -

Change increase swap memory (zone.max-swap) to 12g

Example before swap space change

prctl -n zone.max-swap -i zone zone1
zone: 83: zone2
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-swap
        usage           53.5MB   
        privileged      4.00GB      -   deny                                 -
        system          16.0EB    max   deny                                 -

To change Swap space (change from zone.max-swap to zone.max-locked-memory for locked memory)

prctl -n zone.max-swap -v 6g -r -i zone zone1

After the swap space change

prctl -n zone.max-swap -i zone zone1
zone: 83: zone2
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-swap
        usage           53.5MB   
        privileged      6.00GB      -   deny                                 -
        system          16.0EB    max   deny                                 -

To make the change permanent

zonecfg -z zone1
zonecfg:zone1> add capped-memory
zonecfg:zone1:dedicated-cpu> set physical=3g
zonecfg:zone1:dedicated-cpu> set swap=4g
zonecfg:zone1:capped-memory> end
zonecfg:zone1> verify; commit; exit
global# zoneadm -z zone1 reboot

To add/modify Network on a ruining zone

To add an interface on a ruining zone run (shared mode)

ifconfig e1000g0 addif 10.x.x.x netmask 255.255.255.0 zone zone1 up
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
%d bloggers like this: