1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-02 12:58:35 +03:00
NeilBrown 89f9752ea0 core/mount: minimize impact on mount storm.
If we create 2000 mounts (on a 1-CPU qemu VM) with
  mkdir -p /MNT/{1..2000}
  time for i in {1..2000}; do mount --bind /etc /MNT/$i ; done

it takes around 20 seconds to complete.  Much of this time is taken up
by systemd repeatedly processing /proc/self/mountinfo.
If I disable the processing, the time drops to about 4 seconds.

I have reports that on a larger system with multiple active user sessions, each
with it's own systemd, the impact can be higher.

One particular use-case where a large number of mounts can be expected in quick
succession is when the "clearcase" SCM starts up.

This patch modifies the handling up events from /proc/self/mountinfo so
that systemd backs off when a storm is detected.  Specifically the time to process
mountinfo is measured, and the process will not be repeated until 10 times
that duration has passed.  This ensures systemd won't use more than 10% of
real time processing mountinfo.

With this patch, my test above takes about 5 seconds.
2018-12-16 12:38:40 +01:00
2018-12-14 11:17:52 +01:00
2018-06-14 13:03:20 +02:00
2018-12-04 09:25:39 +01:00
2018-06-14 13:03:20 +02:00
2018-01-12 18:02:57 +01:00
2018-12-10 03:07:17 +09:00
2018-06-20 13:32:57 +02:00
2016-10-06 11:53:58 -04:00
2018-10-29 21:54:42 +01:00
2018-12-10 16:09:41 +01:00

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time Semaphore CI Build Status
Coverity Scan Status
CII Best Practices
Travis CI Build Status
Language Grade: C/C++
CentOS CI Build Status

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.

Description
The systemd System and Service Manager
Readme 575 MiB
Languages
C 89.1%
Python 5.3%
Shell 4.2%
Meson 1.2%