Re: device enumeration by systemd user instances

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mi, 17.07.19 17:46, Pawel Szewczyk (p.szewczyk@xxxxxxxxxxx) wrote:

> Dear all
>
> I was recently working on reducing booting time and I see one issue that
> I think is worth discussing.
>
> The problem is the device units enumeration seems to take a long time
> (>100ms in our case) before any units are beginning to start. I think
> there is some potential for improvement there.

Do you have some profiler results about this? i.e. what exactly is the
time spent on?

Note that systemd generally uses udev "tags" for filtering, which
means we should only processes that are actually supposed to show up
as .device units, and nothing else. Before optimizing this, pleas find
out though what the time is actually spent on.

> I see that on the system I use for testing the user instance of
> systemd is doing an enumeration of devices as well.  Since no matter
> if the systemd is pid 1 or user instance, it loads the same set of
> units which are tagged 'systemd' in udev, if I understand
> correctly. In user session, however, no unit seems to depend on
> device units, so the whole effort of creating them is for
> nothing. My guess is that for many use cases the device units are
> not needed by session services.

Hmm, so some people appear to use this, since we recently fixed a bug
in this area that people noticed while making us of this...

> So here is the question: is this a safe thing to do? I wonder if trying
> to start units without having device units created would break something
> in systemd.

Well, the work needs to be done anyway, so what do you gain if you do
it a bit later?

What specifically do you try to optimize? latency until the first
process is started by systemd --user?

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux