[linux-lvm] Discussion: performance issue on event activation mode

Martin Wilck martin.wilck at suse.com
Thu Sep 30 07:45:51 UTC 2021

On Wed, 2021-09-29 at 23:53 +0200, Peter Rajnoha wrote:
> On Tue 28 Sep 2021 06:34, Martin Wilck wrote:
> > 
> > You said it should wait for multipathd, which in turn waits for
> > udev
> > settle. And indeed it makes some sense. After all: the idea was to
> > avoid locking issues or general resource starvation during uevent
> > storms, which typically occur in the coldplug phase, and for which
> > the
> > completion of "udev settle" is the best available indicator.
> > 
> Udevd already limits the number of concurent worker processes
> processing the udev rules for each uevent. So even if we trigger all
> the
> uevents, they are not processed all in parallel, there's some
> queueing.

This is true, but there are situations where reducing the number of
workers to anything reasonable hasn't helped avoid contention
(udev.children-max=1 is unrealistic :-) ). Heming can fill in the
details, I believe. When contention happens, it's very difficult to
debug what's going on, as it's usually during boot, the system is
unresponsive, and it only happens on very large installments that
developers rarely have access to. But Heming went quite a long way
analyzing this.

> However, whether this is good or not depends on perspective - you
> could
> have massive paralelism and a risk of resource starvation or, from
> the
> other side, you could have timeouts because something wasn't
> processed
> in time for other parts of the system which are waiting for
> dependencies.
> Also, the situation might differ based on the fact whether during the
> uevent processing we're only looking at that concrete single device
> for
> which we've just received an event or whether we also need to look at
> other devices.

Yes, "it depends". We are looking for a solution that "works well" for
any setup without specific tuning. Meaning that the system doesn't
stall for substantial amounts of time during boot.


More information about the linux-lvm mailing list