How to configure pool resource for a zone

1.-create pool_backup in order asigning a minimum 4 and maximun 6

We added in the poolnew file all the configuration for the new pool

root@sol:/# cat poolnew
create pset backup-pset (uint pset.min = 4; uint pset.max = 6)
create pool pool_backup
associate pool pool_backup (pset backup-pset)

2.-Apply the changes

root@sol:/# pooladm -c

3.-Check the new pool information added

root@sol:/# poolcfg –c info 

4.-Now you can see that we have a new pool "pool_backup" with 6 vcpu added and the default that is used by the global

root@sol:/# poolstat
                                              pset
id pool                           size used load
  1 pool_backup             6 0.00 0.01
  0 pool_default           10 0.00 0.12

5.-we will modify the zone configuration in order to assign it to the new cpu pool "pool_backup"

root@sol:/#
root@sol:/# zoneadm list -civ
   6 backup-zone    running    /zones/backup-zone           native   shared

6.-We will add the following information editing the zone configuration "pool and cpu-shares" as you see below, where the limit is to 6, as the poolstat command showed previously


root@sol:/# zonecfg -z backup-zone

zonecfg:backup-zone>; set pool=pool_backup

zonecfg:backup-zone>; verify

zonecfg:backup-zone>; commit

zonecfg:backup-zone>; end

zonecfg:backup-zone>; set name=zone.cpu-shares

zonecfg:backup-zone>; add rctl

zonecfg:backup-zone:rctl>; set name=zone.cpu-shares

zonecfg:backup-zone:rctl>; add value (priv=privileged,limit=6,action=none)

zonecfg:backup-zone:rctl>; end

zonecfg:backup-zone>; exit root@sol:/#


7.-After performing the changes you will need to reboot the zone in order to do the changes

root@sol:/# zoneadm -z backuppc-zone reboot
root@sol:/# zoneadm list -civ
  ID NAME             STATUS     PATH                                          BRAND    IP
   0 global                   running    /                                              native   shared
   1 backup-zone      running    /zones/backup-zone             native   shared

 8.-Now you can see with the psrinfo command the vcpu assigned to the zone in this case six "6"


 root@sol:/# zlogin backup-zone
[Connected to zone 'backup-zone' pts/4]
Last login: Mon May 11 12:47:09 from 198.111.22.211

-bash-3.2# psrinfo -vp
The physical processor has 6 virtual processors (0-5)
  SPARC64-VII (portid 1024 impl 0x7 ver 0x91 clock 2400 MHz)
-bash-3.2# exit

logout

9.-This is the part that is interesting, becasuse if we need more vcpu or processing for this zone you can increase them on the fly.


Actually we have the following 16 vcpu distributed in 6 for the pool_backup and the rest for the pool_default
 root@sol:/# poolstat
                              pset
id pool                   size used load
1 pool_backup             6 0.00 0.01
0 pool_default           10 0.00 0.12

 Now we can add more vcpu due to we need assign more to pool_backup
root@sol:/# poolcfg -c 'modify pset backup-pset ( uint pset.min = 4; uint pset.max = 8)'
root@sol:/# pooladm -c
root@sol:/# poolstat
                                                  pset
id pool                             size used load
  1 pool_backupp          8 0.00 0.02
  0 pool_default                8 0.00 0.18
root@sol:/#

You can see that we have been taken from pool_default two "2" in order to assign to pool_backup

Important: The Global Zone always will need 4 vcpu to process all your need, it is the minimun requirement to take in count.

Regards
Roger

Comments