[Bug 1882986] Re: open-iscsi is slowing down the boot process
Zakhar
1882986 at bugs.launchpad.net
Tue Jun 16 21:29:32 UTC 2020
I did some more investigations anyway, and discovered:
"It is not a bug, it is a feature"!
__________________
Steps to reproduce:
==================
- In Virutalbox, start a new test machine
- Install a fresh 20.04 (minimal install is enough, and I did it in my 20GB RAM disk, it's faster!)
- sudo update/upgrade
- stop the VM
Now on the network configuration of you VM which defaults to NAT, go to
advance and "unplug" the cable. That will create (don't ask me why!) a
7.5 sec delay on network start, simulating almost what I have on my real
network.
- Start the VM
- Look at the systemd-analyze plot (file attached)
- "Replug" the cable (you can do it without restarting)
- Install open-isci
- Create a node (discover, or what I did is copy my nodes configuration to the VM)
- Stop the VM
- "Unplug" the cable
- Start again
- Look again at systemd-analyze plot (file attached)
What you see is that in the first case "Network-manager-online-wait and "Plymouth-quit-wait" clearly overlap, allowing a lot of the session services to start without waiting for the network.
On the second graph you see that they do NOT overlap and Plymouth-quit-wait waits until the end of the 7.5 seconds timeout to kick in, with the rest of the session services.
The total difference is not 7.5 sec in this case because due to VirtualBox, it benefits from the "7.5 sec" wait to launch some VM related services. So the end difference is rather about 3 or 4 seconds for no iscsi mounts (since none are automatic)
So I guess there is indeed a relation that I don't see when you have iscsi WITH some nodes (without any nodes, indeed systemd does not even try to start iscsi) that instructs Plymouth to be run only after some successor of iscsid.
I guess this is "work as design" because the expectation is that since you have some nodes (although none are marked as "automatic"!) they are supposed to be needed by the user-session so there must be somewhere an instruction to "wait"...
This assumption is wrong in my case, so I don't need the "work as designed" behaviour. Since there is no "fancy configuration" to say to iscsi that he got the wrong assumption, I guess my workaround is also the simplest way to tell it!
QED
** Attachment added: "VM Clean 20.04 startup with iscsi DISABLED"
https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1882986/+attachment/5384542/+files/startup_iscsi2.svg
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to open-iscsi in Ubuntu.
https://bugs.launchpad.net/bugs/1882986
Title:
open-iscsi is slowing down the boot process
Status in open-iscsi package in Ubuntu:
Invalid
Bug description:
This is not a bug, but rather an "optimisation" request.
(Probably set this as "enhancement request" + Low)
Apparently, the package is assuming the user will need some iscsi
mounts for his session, and is putting dependencies in the systemd
services/targets which effects are to delay "graphical.target" to
after the point when the network is online.
A great job has been done by Ubuntu so that the O.S. appears to be
"snappy" from the boot, and when the session is in "auto-login", it
really makes a great difference and a good feeling of the system being
very quick.
This assumption of open-iscsi sort of ruins that effort.
As an example, on my PC the graphical target is delayed 10 seconds
more (was 22 seconds and is now 32). The impression is not as good and
the system feels "slow again" (although it is just a feeling!)
Step to reproduced (you don't even need to have iscsi LUNs to to so, just install the package!)
- Start from a clean 20.04, boot up and issue: systemd-analyze
- Now install open-iscsi, reboot and issue again: systemd-analyze
The result will probably be a big impact on "graphical target",
although total time does not change a lot.
My usage is not needing iscsi targets for my session.
I have a NAS with iscsi LUNs, and when I need those mounts, I just start them with a command.
sudo iscsiadm -m node -l
Then Gnome recognises a new disk has been inserted and does an "auto mount".
This command works whether the service was started or not.
This wrong assumption is easily fixed in my case with this command:
sudo systemctl disable iscsid.socket iscsid.service open-iscsi.service
Then, at the next reboot the graphical target is snappy again, and does not have to wait for network-online and remote-fs targets.
I don't know what can be done to cope with both situations : those who
need an iscsi target mounted for their session, and those who don't...
but I guess the philosophy now should be to assume the user does not
need such targets, and don't put dependencies that delay the snappy
boot process.
For those who need those mounted remote fs for their session, detailed
help on how to enable iscsi services at startup should be provided.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1882986/+subscriptions
More information about the foundations-bugs
mailing list