On 03/11/2012 10:08 PM, Bruce Dubbs wrote:
> Armin K. wrote:
>> On 03/11/2012 09:25 PM, Bruce Dubbs wrote:
>>> Armin K. wrote:
>>>> On 03/11/2012 08:34 PM, Bruce Dubbs wrote:
>>>> Startup finished in 1s 655ms 874us (kernel) + 19s 811ms 430us
>>>> (userspace) = 21s 467ms 304us.
>>>>
>>>> On Pentium 4 2.8GHz and 1024MB of RAM with lots of services.
>>>>
>>>> acpid, avahi, cronie, rsyslog, udev, dbus, network-manager, ntp, cups,
>>>> ssh and lightdm.
>>> Right. The startup takes longer for systemd.
>>>
>>
>> Wrong. On my machine with same services and their initscripts it takes
>> about 40 seconds. This is the time from Grub to Gnome Fallback since
>> lightdm auto logins to it.
>
> Can you post your /run/var/bootlog from a standard lfs boot?
>
I never bothered installing sysvinit in first place. Neither init scripts.
> Mine is below.
>
> > Not every init script is just made of that stuff.
>
> Can you give an example?
>
Just take a look at some of lfs bootscripts.
>
> > And still, no on-demand activation.
>
> What do you want to activate on demand?
>
Everything possible. I don't have to keep every service enabled whole
time. ssh, cups, saned are some examples. There are possibly even more.
Even tty's ... I don't need to have 6 tty's activated at once. One at
first, then others are spawned on demand.
Now, I'd like to add that I link my binaries against everything, so
startup takes longer to complete ... Ie, LFS coreutils aren't linked
against acl/attr/libcap/libselinux - mine are. And by some analogy, it
takes more time to load more shared libs ... Isn't it so?
Also, I build everything as possible as kernel modules, I have only
required stuff builtin into kernel. And loading modules takes time too
... 3 to 4 seconds here.
$ ldd /lib/systemd/systemd
linux-gate.so.1 => (0xb7789000)
libselinux.so.1 => /lib/libselinux.so.1 (0xb7742000)
libdbus-1.so.3 => /lib/libdbus-1.so.3 (0xb76fa000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb76de000)
libudev.so.0 => /lib/libudev.so.0 (0xb76cf000)
libwrap.so.0 => /lib/libwrap.so.0 (0xb76c5000)
libpam.so.0 => /lib/libpam.so.0 (0xb76b8000)
libcap.so.2 => /lib/libcap.so.2 (0xb76b3000)
libkmod.so.2 => /lib/libkmod.so.2 (0xb769d000)
librt.so.1 => /lib/librt.so.1 (0xb7687000)
libc.so.6 => /lib/libc.so.6 (0xb74f3000)
/lib/ld-linux.so.2 (0xb778a000)
libdl.so.2 => /lib/libdl.so.2 (0xb74ed000)
libnsl.so.1 => /lib/libnsl.so.1 (0xb74d2000)
libattr.so.1 => /lib/libattr.so.1 (0xb74cd000)
liblzma.so.5 => /lib/liblzma.so.5 (0xb74a7000)
libz.so.1 => /lib/libz.so.1 (0xb7490000)
If I used less dependencies, I guess it would be faster. But it's enough
conflict for now. As I said, I'll write a blog entry or a hint how to
build minimal and functional systemd on {,B}LFS ... Then you could give
it a try. As for now, let's keep ConsoleKit. But I say it now - it is
just matter of time for us to accept it, because it's integration has
begun ... If it was up to me, I'd still keep consolekit ... It's
simpler. I've said my reasons why I like it ... And to be honest, I hate
bash scripts ... For me systemd is just better than standard sysvinit
even tough it has too many features that I don't need ...
Now the point of my story is: It is faster on my hardware than sysvinit,
I can escape bash scripts hell, I can have less services started than I
need in some circumstances, but still rely on unstarted ones via socket
activation and easily enable/disable services via systemctl without
bothering to create any symlinks in /etc/rc.d/rc{0..6}.d or worry if a
should be started before b or such. It is being easier to maintain for
me. I do agree with you the point of showing people how things work, and
hiding stuff behind 100 000 of code is wrong ... But do notice that 100
000 isn't just /sbin/init ... It tends to replace many features, such as
bash, modprobe, hostname, cryptsetup, syslog, consolekit and so on ...
So if you agree, let's calm down, I've said everything I want. Just
notice, since it's getting widely accepted into upstream, at some point
we will have to add it for things to work, especially with desktops.
> -- Bruce
>
> Feb 29 16:05:57 -06:00 (none) Mounting virtual file systems: /run
> /proc /sys OK
> Feb 29 16:05:57 -06:00 (none) Bringing up the loopback interface... OK
> Feb 29 16:05:57 -06:00 (none) Setting hostname to core2-blfs... OK
> Feb 29 16:05:57 -06:00 core2-blfs Populating /dev with device nodes... OK
> Feb 29 16:06:03 -06:00 core2-blfs Activating all swap
> files/partitions... OK
> Feb 29 16:06:03 -06:00 core2-blfs Mounting root file system in
> read-only mode... OK
> Feb 29 16:06:03 -06:00 core2-blfs Checking file systems... OK
> Feb 29 16:06:05 -06:00 core2-blfs Remounting root file system in
> read-write mode... OK
> Feb 29 16:06:05 -06:00 core2-blfs Recording existing mounts in
> /etc/mtab... OK
> Feb 29 16:06:05 -06:00 core2-blfs Mounting remaining file systems... OK
> Feb 29 16:06:05 -06:00 core2-blfs Cleaning file systems: OK
> Feb 29 16:06:05 -06:00 core2-blfs Creating files and directories... OK
> Feb 29 16:06:05 -06:00 core2-blfs Retrying failed uevents, if any... OK
> Feb 29 16:06:07 -06:00 core2-blfs Starting system log daemon... OK
> Feb 29 16:06:07 -06:00 core2-blfs Starting kernel log daemon... OK
> Feb 29 16:06:07 -06:00 core2-blfs Bringing up the br0 interface...
> Feb 29 16:06:07 -06:00 core2-blfs Creating the br0 interface... OK
> Feb 29 16:06:07 -06:00 core2-blfs Adding eth0 to br0... OK
> Feb 29 16:06:07 -06:00 core2-blfs Setting net.ipv4.ip_forward = 1 OK
> Feb 29 16:06:07 -06:00 core2-blfs Adding IPv4 address 192.168.0.22 to
> the br0 interface... OK
> Feb 29 16:06:07 -06:00 core2-blfs Setting up default gateway... OK
> Feb 29 16:06:07 -06:00 core2-blfs Bringing up the eth0 interface... skipped
> Feb 29 16:06:07 -06:00 core2-blfs Bringing up the test interface... skipped
> Feb 29 16:06:07 -06:00 core2-blfs Starting rpcbind OK
> Feb 29 16:06:07 -06:00 core2-blfs Starting NFS statd... OK
> Feb 29 16:06:07 -06:00 core2-blfs Starting NFS mountd... OK
> Feb 29 16:06:08 -06:00 core2-blfs Starting NFS nfsd... OK
> Feb 29 16:06:08 -06:00 core2-blfs Starting NFS statd... OK
> Feb 29 16:06:08 -06:00 core2-blfs Exporting NFS Filesystems... OK
> Feb 29 16:06:08 -06:00 core2-blfs Initializing kernel random number
> generator... OK
> Feb 29 16:06:08 -06:00 core2-blfs Starting ntpd... OK
> Feb 29 16:06:08 -06:00 core2-blfs Mounting network volumes... OK
> Feb 29 16:06:08 -06:00 core2-blfs Starting RSYNC Server... OK
> Feb 29 16:06:08 -06:00 core2-blfs Starting SSH Server... OK
>
>
$ dmesg | grep systemd
[ 1.570662] systemd[1]: systemd 43 running in system mode. (+PAM
+LIBWRAP -AUDIT +SELINUX +SYSVINIT +LIBCRYPTSETUP; other)
[ 1.617365] systemd[1]: Inserted module 'autofs4'
[ 1.624657] systemd[1]: Set hostname to <krejzi>.
[ 21.467431] systemd[1]: Startup finished in 1s 655ms 874us (kernel) +
19s 811ms 430us (userspace) = 21s 467ms 304us.
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page