Skip to content

systemctl status (with journald access) seems unnecessarily slow (disk bound) #7963

@sourcejedi

Description

@sourcejedi

Submission type

  • Request for enhancement (RFE)

systemd version the issue has been seen with

236 git ish

Used distribution

Fedora 27

In case of bug report: Expected behaviour you didn't see

In case of bug report: Unexpected behaviour you saw

Using systemctl status, which shows the last five log messages, takes over 10 times longer than journalctl -b, which already shows all the same lines. This is particularly noticeable if you ask for several units; systemctl status *.mount takes 140x as long.

I think it would be better to optimize systemctl status, to explicitly not request messages from previous boots. IMO this would fit with the mental model of what systemctl status is supposed to do.

In case of bug report: Steps to reproduce the problem

$ time journalctl -b >/dev/null

real	0m0.101s
user	0m0.049s
sys	0m0.018s

$ time systemctl status dbus >/dev/null

real	0m4.670s
user	0m0.021s
sys	0m0.071s

$ time systemctl status *.mount>/dev/null

real	0m14.654s
user	0m0.075s
sys	0m0.214s

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions