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

Martin Wilck martin.wilck at suse.com
Fri Oct 1 07:41:31 UTC 2021


On Thu, 2021-09-30 at 23:32 +0800, heming.zhao at suse.com wrote:
> > I just want to say that some of the issues might simply be
> > regressions/issues with systemd/udev that could be fixed. We as
> > providers of block device abstractions where we need to handle,
> > sometimes, thousands of devices, might be the first ones to hit these
> > issues.
> > 
> 
> The rhel8 callgrind picture
> (https://prajnoha.fedorapeople.org/bz1986158/rhel8_libudev_critical_cost.png
> )
> responds to my analysis:
> https://listman.redhat.com/archives/linux-lvm/2021-June/msg00022.html
> handle_db_line took too much time and become the hotspot.

I missed that post. You wrote

> the dev_cache_scan doesn't have direct disk IOs, but libudev will
scan/read
> udev db which issue real disk IOs (location is /run/udev/data).
> ...
> 2. scans/reads udev db (/run/udev/data). may O(n)
>  udev will call device_read_db => handle_db_line to handle every
>    line of a db file.
> ...
> I didn't test the related udev code, and guess the <2> takes too much
time.

... but note that /run/udev is on tmpfs, not on a real disk. So  the
accesses should be very fast unless there's some locking happening.

Regards
Martin





More information about the linux-lvm mailing list