-------- Original Message  --------
Subject: [zones-discuss] zones and cpu shares
From: Niklas Jonsson <[EMAIL PROTECTED]>
To: zones-discuss@opensolaris.org
Date: Thu Jul 19 2007 10:58:44 GMT+0200 (CEST)

> Hi,
> 
> I have 5 zones on my machine,
> 
> I would like to change the cpu-shares for all these machines to look like 
> this:
> 
> machine 1, Should have a minimum of 50% cpu share available all the time
> 
> machine 2-5, share the rest of the resources.
> 
> If I do this with pools (since this is a V445 with 4 cpu's) that would mean,
> 
> machine gets 2 cpu's, machine 2-5 only shares 1 cpu, and the global-zone gets 
> one cpu.
> 
> Hope someone could explain how to do this.

$ pooladm -e
$ pooladm -s
$ pooladm -c

$ poolcfg -c 'create pset pset1 (uint.min = 2 ; uint.max = 2)'
$ poolcfg -c 'create pset pset2 (uint.min = 1 ; uint.max = 1)'

$ poolcfg -c 'create pool pool1'
$ poolcfg -c 'create pool pool2'

$ poolcfg -c 'associate pool pool1 (pset pset1)'
$ poolcfg -c 'associate pool pool2 (pset pset2)'

$ pooladm -c

Assuming, the zones are up & running:
$ poolbind -p pool1 -i machine1
$ poolbind -p pool2 -i machine2
$ poolbind -p pool2 -i machine3
$ poolbind -p pool2 -i machine4
$ poolbind -p pool2 -i machine5

To make the bindings persistent, use
$ zonecfg -z <zone> set pool=<pool>

---------------

With latest OpenSolaris builds and upcoming S10U4, you can directly
dedicate the cpus using zonecfg without creating pools.
Eg:
        $ zonecfg -z <zone>
        add dedicated-cpu
                set ncpus=2-2
        end

-- Renaud




_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to