On Wed, 8 Nov 2006, Dennis Clarke wrote:

> How does Solaris load up its tasks and know when to say "stop, no more 
> please"?

Provided the kernel doesn't run out of VM, I don't think the
Solaris kernel ever says that (I'm thinking here of pathalogical
fork-bomb experiments, where the load has gone >> 1000).

> And I write a script that has hundreds of files to unzip.  Each file is
> variable in length and I unzip each file thus :
> 
>   priocntl -e -c FX -m 0 -p 0 unzip -q foo.zip &
> 
> So there is a script that has hundreds of lines of that for hundreds of
> little files called foo_N.zip

[...]

> # vmstat 5
>  kthr      memory            page            disk          faults      cpu
>  r b w   swap  free  re  mf pi po fr de sr f0 s2 -- --   in   sy   cs us sy id
>  0 0 0 1800088 841272 9  39 57 17 17  0 13  0 11  0  0  603  646  324  3  4 93
>  8 0 0 1782680 765176 741 2387 0 2548 2548 0 0 0 38 0 0 700 4385  126 51 49  0
>  5 0 0 1764040 762392 784 2839 6 3285 3285 0 0 0 86 0 0 950 5074  247 45 55  1
>  29 0 0 1752320 767168 513 65 2 4645 4645 0 0 0 93 0 0 1003 3400  197 59 34  7
>  26 0 0 1755160 775216 300 6 0 3567 3567 0 0 0 143 0 0 1310 4104  333 46 38 16
>  34 0 0 1761392 772416 363 3 2 4899 4899 0 0 0 106 0 0 1082 2448  229 60 30 10
>  29 0 0 1765464 771760 304 2 0 4941 4941 0 0 0 135 0 0 1272 4571  253 47 37 15
>  9 0 0 1769480 768136 458 1  0 3123 3123 0 0 0 100 0 0 1038 2231  153 71 29  0
>  27 0 0 1771360 747872 484 1 2 2680 2680 0 0 0 107 0 0 1088 2248  137 68 30  2
>  6 0 0 1774816 749224 320 2  2 4830 4830 0 0 0 161 0 0 1463 3178  153 51 33 16
>  12 0 0 1777544 760936 523 1 8 3350 3350 0 0 0 111 0 0 1121 2941  138 65 31  5
>  6 0 0 1778688 768336 261 1 13 5963 5963 0 0 0 377 0 0 2572 1589   88 30 21 49
>  5 0 0 1779112 786672 424 0 70 5070 5070 0 0 0 225 0 0 1764 2004  122 49 26 24
> 
> You see that?  I had a maximum of 34 threads in the run queue.
> 
> But I have hundreds of tasks to run and they are all low priority fixed
> class processes.

Conjecture follows; I'm sure others who are more intimate with the kernel's
inner workings than I will correct me if I'm wrong...

You have hundreds of unzip operations to do, but observe a maximum
of only 34 at any one time.  I guess it's possible that the number
of processes went higher between vmstat samples, but I think what
you're seeing here is the effect of some of those unzips finishing.

So, unzip1 starts, then unzip2, and so on.  But by the time unzip35
starts, the first one has finished, hence the value of the r column.

> There .. I actually laid that all out.  It was what was in my head and I was
> even going to say that a multi-core person could have a ladel in each hand.
> Possibly eight hands in the case of an UltraSparc T1.

Visions of the Hindu goddess Durga ladeling water abound!

> At what point does Solaris push back and say "no more, I'm busy" ?  I am now
> going to go to amazon.com and order a copy of "Solaris Internals".

Good idea on the latter; as for the former, I don't think it does,
VM resources notwithstanding.

-- 
Rich Teer, SCNA, SCSA, OpenSolaris CAB member

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to