:: Re: [DNG] Detailed technical treati…
Kezdőlap
Delete this message
Reply to this message
Szerző: Rainer Weikusat
Dátum:  
Címzett: dng
Tárgy: Re: [DNG] Detailed technical treatise of systemd
Didier Kryn <kryn@???> writes:
> Le 05/11/2015 20:05, Rainer Weikusat a écrit :


[...]

>> Worrying about 'starting servers in parallell' only makes sense if
>> there's a real-world situation where this demonstrably makes a relevant
>> difference.


[...]

>     Jokes apart, starting daemons in parallel is simply faster when
> you have several cores. I do care booting fast.


I did a litte experiment on this: I booted my 'work computer' via
init=/bin/bash and recorded top -d 0.05 -b output while booting into
multi-user mode via exec init 2, followed by analyzing the resulting
data. The whole procedure took 1minute 12s but this includes the time
needed to start and top the top process.

CPU utilization ((100 - idle) - wait)
-------------------------------------
min        0
max        31
avg        1.74
deviation    2.96
median        0



CPU utilization grouped in 5% buckets
-------------------------------------
0.000-4.000     854     (95.8%)
5.000-9.000     20      (2.2%)
10.000-14.000   9       (1%)
15.000-19.000   1       (0.1%)
20.000-24.000   3       (0.3%)
25.000-29.000   2       (0.2%)
30.000-34.000   2       (0.2%)



Out of 891 samples, 879 had either init, bash or top or a kernel thread
as 'most CPU intensive process', init and bash with 0%. That's 98.65%. The other
twelve were

  940 root      20   0 21524 1508  844 S  18.9  0.0   0:00.04 udevd
 1060 root      20   0  6404  804  668 D   1.1  0.0   0:00.01 modprobe
  812 root      20   0 12768 2556 1916 S   2.5  0.0   0:00.02 startpar
  812 root      20   0 12768 2556 1916 S   6.4  0.0   0:00.03 startpar
 2838 root      20   0 12772 2560 1916 S   1.0  0.0   0:00.01 startpar
 3114 bind      20   0  197m  18m 2080 S   3.0  0.2   0:00.03 named
 3147 tunnel    20   0 49164 3496 2780 S  14.8  0.0   0:00.01 ssh
 2838 root      20   0 12772 2560 1916 S  14.6  0.0   0:00.03 startpar
 2838 root      20   0 12772 2560 1916 S  14.7  0.0   0:00.04 startpar
 3301 root      20   0  117m 6048 3996 D   5.9  0.1   0:00.01 apache2
 3301 root      20   0  145m 8456 5148 R  17.3  0.1   0:00.04 apache2
 3146 tunnel    20   0 49164 3492 2780 S   1.6  0.0   0:00.01 ssh


and these weren't exactly close to each other.

I'm attaching a few graphs showing this but the conclusion is "Whoever
believes parallelization beyond starpar will improve 'booting speed' for
this machine is sadly mistaken".