You are not logged in.

#1 2024-07-21 20:58:46

tnmears
Member
Registered: 2024-07-21
Posts: 2

Console hesitation on systemctl

I noticed that when in the chroot on the install iso running systemctl like

systemctl enable whatever

runs instantly.

However, after logging into the new system, in a tty before installing anything graphical and after installing nvidia+xfce, when running the exact same command there is a noticeable delay. Both using sudo and as root.

is this normal?

I am using the July iso.

Offline

#2 2024-07-22 07:19:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,939

Re: Console hesitation on systemctl

How long is "a noticeable delay" in seconds?
Is *only* that command affected? disabling services or non-ystemctl stuff "echo foo" return instantly?

Offline

#3 2024-07-22 15:06:35

tnmears
Member
Registered: 2024-07-21
Posts: 2

Re: Console hesitation on systemctl

Maybe a quarter of a second?

It also does it with disabling with systemctl. other commands don't seem affected.

Offline

#4 2024-07-22 16:23:57

cryptearth
Member
Registered: 2024-02-03
Posts: 2,185

Re: Console hesitation on systemctl

so you feel 0.25s as "noticeable long"? my personal reaction time is slower than this - I wouldn't even be able to tell a difference

Offline

#5 2024-07-22 16:48:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Console hesitation on systemctl

A quarter second is pretty trivial.  Enabling and disabling both trigger filesystem operations which would explain why it would be faster in the iso.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2024-07-22 17:00:52

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Console hesitation on systemctl

The enable option just creates symlinks so do you see the same delay if you do that yourself?

For example, with nftables.service, instead of `systemctl enable` use

# ls -s /usr/lib/systemd/system/nftables.service /etc/systemd/system/multi-user.target.wants

Is that faster?

Disabling is just a matter of deleting the symlink, which should also be very quick.


Jin, Jîyan, Azadî

Offline

#7 2024-07-22 17:18:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Console hesitation on systemctl

Head_on_a_Stick (emphasis added) wrote:

The enable option just creates symlinks

Are you sure that's all it does?  It doesn't flush the write and / or confirm the link is properly in place?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2024-07-22 17:38:41

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Console hesitation on systemctl

Yes, journal operations are also part of systemctl. My suggestion is intended to test if the symlinks are the problem or systemctl itself.


Jin, Jîyan, Azadî

Offline

#9 2024-07-22 18:26:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,939

Re: Console hesitation on systemctl

Next to FS operations it could also be noise on the system bus (the reason we cannot just throw strace at the situation and look why systemd is slow) but at 250ms we should maybe actually measure the delay

sudo -v
time sudo systemctl enable whatever

and try that a couple of times to check whether it's consistent.

Speaking of: are subsequent (idempotent) calls slow as well?
Are --dry-run ones?

systemd takes a moment to enable a service here and my gut feeling is that the daemon reloads as consequence.

Offline

Board footer

Powered by FluxBB