Hi Rainer,

(see below)

On Tue, Nov 25, 2008 at 9:18 AM, Rainer Orth
<[EMAIL PROTECTED]> wrote:
> I've recently tried to temporarily change zone.cpu-shares of the global
> zone on a Sun Fire X4200 M2 running Solaris 10 Update 5.  Per default, both
> the global and the imap zone have 10 shares:
>
> global% zonecfg -z global info rctl
> rctl:
>        name: zone.cpu-shares
>        value: (priv=privileged,limit=10,action=none)
> global% zonecfg -z imap info rctl
> rctl:
>        name: zone.cpu-shares
>        value: (priv=privileged,limit=10,action=none)
>
> FSS is the default scheduler:
>
> global% dispadmin -d
> FSS     (Fair Share)
>
> For a benchmark run, I wanted to temporarily increase the shares of the
> global zone.  I tried both to increase global zone shares to 100 and
> reducing imap zone shares to 1:
>
> global# prctl -i zone -n zone.cpu-shares -r -v 100 global
> global# prctl -i zone -n zone.cpu-shares -r -v 1 imap
> global# prctl -i zone -n zone.cpu-shares global imap
> zone: 0: global
> NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
> zone.cpu-shares
>        privileged        100       -   none                                 -
>        system          65.5K     max   none                                 -
>
> zone: 4: imap
> NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
> zone.cpu-shares
>        privileged          1       -   none                                 -
>        system          65.5K     max   none                                 -
>
> Unfortunately, this had no effect, as can be seen with prstat -Z:
>
>   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
>  2711 ro       6848K 6392K run      1    0 236:19:41  12% john/1
>  2710 ro       6848K 6384K cpu2     6    0 236:01:19  12% john/1
>  2707 ro       6976K 6512K run      1    0 235:53:41  12% john/1
>  2835 ro       6976K 6524K run      7    0 235:42:22  11% john/1
>  1981 root     4556K 4076K sleep   59    0   1:27:03 1.5% prstat/1
>  6539 root     2504K 2008K cpu3    59    0   0:00:00 0.0% prstat/1
>  6293 vmail      20M 5256K sleep   59    0   0:00:04 0.0% imap/1
>   429 root     5600K 3052K sleep   59    0   0:12:12 0.0% automountd/3
>  1356 100        16M   15M sleep   58    0   0:28:48 0.0% imap-login/1
>  1358 100        12M   11M sleep   49    0   0:12:59 0.0% imap-login/1
>  6459 vmail      42M 8220K sleep   57    0   0:00:02 0.0% imap/1
>  6201 vmail    3852K 3020K sleep   59    0   0:00:00 0.0% imap/1
>  6921 noaccess  323M  238M sleep   59    0   0:12:31 0.0% java/25
>  6284 vmail    3240K 2400K sleep   55    0   0:00:00 0.0% imap/1
>  1357 100        10M 9784K sleep   59    0   0:12:10 0.0% imap-login/1
> ZONEID    NPROC  SWAP   RSS MEMORY      TIME  CPU ZONE
>     0       64  784M  909M    11% 953:58:18  49% global
>     4      387  541M  349M   4.3%   1:11:04 0.1% imap
>
>
>
> Total: 451 processes, 731 lwps, load averages: 4.70, 4.70, 4.77
>
> There are four single-threaded processes in the global zone, each of which 
> could consume a whole core (the box has 4 dual-core cpus), but still the
> global zone remains at ca. 50% cpu consumption.

Solaris sees this as an 8-CPU system. A single-threaded process can't
consume more than 1/8th of the system - 12.5%. So far, everything is
as it should be. Running a fifth copy of that program should result in
five processes, each at 12% - for a total of 60%.

> Starting additional processes has no effect either, even if they run as root. 
>  I seem not to be
> able to exceed the old zone.cpu-shares value of 50.

Are you saying that you have tried to run more than 4 copies of that
program, and together they use about 50%? For example, if you run 6 of
them, they each get 8%?

Also, does "ps -ec" show that those 4 processes are in the FSS class?

> In addition to those zone.cpu-shares, per-project cpu shares are in effect
> for user ro, but not for root:
>
> global# getent project user.ro
> user.ro:2110::::project.cpu-shares=(privileged,1,none);project.max-lwps=(privileged,256,deny)
> global# getent project user.root
> user.root:1::::
>
> Nonetheless, inside the global zone, cpu consumption between root and ro is
> almost equal (as if root had one share as well).
>
> Is there any way to have the new zone.cpu-shares take effect without
> rebooting the machine?  Given that this is also the department's IMAP
> server, I'd very much like to avoid this.
>
>        Rainer
>
> -----------------------------------------------------------------------------
> Rainer Orth, Faculty of Technology, Bielefeld University
> _______________________________________________
> zones-discuss mailing list
> zones-discuss@opensolaris.org
>



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

Reply via email to