Solaris : How to create processor set (pset) and associate it with a pool
Resource pools provide a mechanism for partitioning a system into persistent processor sets with optional scheduling class assignments. Pools even work with Dynamic Reconfiguration (DR). The post describes how to create a processor set and associate it with a pool. Before a processor pool can be created, the svc:/system/pools:default service must be enabled. It can be verified with the following command:
# svcs -l svc:/system/pools:default fmri svc:/system/pools:default name resource pools framework enabled true state online next_state none state_time Sun Jun 09 12:54:36 2013 logfile /var/svc/log/system-pools:default.log restarter svc:/system/svc/restarter:default dependency require_all/none svc:/system/filesystem/minimal (online)
If the service is not enabled, it can be enabled with the following command:
# svcadm enable svc:/system/pools:default
Configuration file
The default configuration file for pools is /etc/pooladm.conf. There are basically three things listed in this file:
system - This is the machine-level entity which represents the entire system. pset - This is a processor set. pool - This is a named collection of resources (processor set and/or scheduling class assignment).
Setting up pset
Check the current configuration of the machine as it exists now. You should see that everything has been allocated to the default processor set, or pset_default:
# pooladm
system default
string system.comment
int system.version 1
boolean system.bind-default true
string system.poold.objectives wt-load
pool pool_default
int pool.sys_id 0
boolean pool.active true
boolean pool.default true
int pool.importance 1
string pool.comment
pset pset_default
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 6
uint pset.size 4
string pset.comment
cpu
int cpu.sys_id 1
string cpu.comment
string cpu.status on-line
cpu
int cpu.sys_id 0
string cpu.comment
string cpu.status on-line
cpu
int cpu.sys_id 3
string cpu.comment
string cpu.status on-line
cpu
int cpu.sys_id 2
string cpu.comment
string cpu.status on-line
At any time you can update the static configuration using the following command.
# pooladm -s
This gets committed to the /etc/pooladm.conf file whenever the following command is run:
# pooladm -c
To start creating a processor set, first create the pset itself. In this example, the processor set is specifically being created to have 2 cpus at all time, so the max and min values of the processor set are the same.
# poolcfg -c 'create pset pset_test (uint pset.min = 2; uint pset.max = 2)'
Once the pset is created, the pool can be created.
# poolcfg -c 'create pool pool_test'
Then the pool must be associated to the pset.
# poolcfg -c 'associate pool pool_test (pset pset_test)'
The processor set and pool should look like this now:
# poolcfg -c info
system default
string system.comment
int system.version 1
boolean system.bind-default true
string system.poold.objectives wt-load
pool pool_default
int pool.sys_id 0
boolean pool.active true
boolean pool.default true
int pool.importance 1
string pool.comment
pset pset_default
pool pool_test
boolean pool.active true
boolean pool.default false
int pool.importance 1
string pool.comment
pset pset_test
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 12
uint pset.size 4
string pset.comment
cpu
int cpu.sys_id 1
string cpu.comment
string cpu.status on-line
cpu
int cpu.sys_id 0
string cpu.comment
string cpu.status on-line
cpu
int cpu.sys_id 3
string cpu.comment
string cpu.status on-line
cpu
int cpu.sys_id 2
string cpu.comment
string cpu.status on-line
pset pset_test
int pset.sys_id -2
boolean pset.default false
uint pset.min 2
uint pset.max 2
string pset.units population
uint pset.load 0
uint pset.size 0
string pset.comment
And the configuration should be committed to pooladm.conf as well.
# poolcfg -c
Reboot the system, and the processor set will be created according to the guidelines set down by the configuration.
# shutdown -i6 -g0 -y
Verify
At this point the processor set has been created, and is available for use by any zones or applications as per your requirement. To verify the pset creation and pool usage use below commands:
# psrinfo # psrset # poolstat
No comments:
Post a Comment