[systemd-devel] [PATCH] core: add default extra dependency option

Lennart Poettering lennart at poettering.net
Mon Mar 3 06:43:24 PST 2014


On Mon, 03.03.14 11:52, WaLyong Cho (walyong.cho at samsung.com) wrote:

> > But if you do this on an embedded system you can do
> > DefaultDependencies=no for all services where you want this and place
> > them manually?
> > 
> Almost I can. Actually I can request to the package manager in our
> system. But, I don't want to put DefaultDependencies=no to all of
> services. Then all of services should consider which mount, socket, path
> and more units are needed to launch itself. I don't want this. I just
> wants they launch after basic.target and some of special services what
> should be per-processed before than others to optimize boot speed
> extremely. (Those pre-processed services will be listed in config with
> DefaultExtraDependencies=)
> > 
> > Also, are you sure that you really want to solve this with manual deps?
> > I mean, the kernel already has a CPU scheduler and an IO
> > scheduler. Maybe it would be better to simply dump all the scheduling
> > work on the kernel as far as that is possible, start everything in
> > parallel, but then also tell the kernel what matters more, and what
> > matters less.
> > 
> > We already expose CPUShares= and BlockIOWeight= for services. Maybe we
> > should duplicate these as StartupCPUShares= and StartupBlockIOWeight=
> > which could set different values to apply only while the boot process is
> > not complete yet. Or something like that. 
> > 
> > Lennart
> > 
> Parallel is good and by this, systemd is very flexible to suit our
> product. But I(our product) want to some of services occupy most of
> system resources at the head of boot sequence. (don't confuse that will
> after basic.target) Some more detail, we play some of animation during
> boot and we call that boot-animation(similar with splash animation).
> During that time, we launch essential services and idle screen with this
> functionality. At this time, we don't want any other services are using
> system resources.
> 
> StartupCPUShares= and StartupBlockIOWeight= maybe good idea. But should
> be considered it really OK, lower or higher CPUShares and BlockIOWeight
> during whole boot time.

Yes, precisely, that is what I want StartupCPUShares= to be: an
alternative to CPUShares= that is applied only while the system is
booting up.

A service with this configuration:

    CPUShares=1024
    StartupCPUShares=10

Would be scheduled at a very low priority during startup, but as soon as
startup is complete would be bumped to normal levels.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list