I use rclone with both my work computer and personal computer in order to synchronize my Google Drive. I do this by using a systemd service on both machines. It works fine except for one issue: boot times on both machines are extremely slow (about 3 minutes). Help diagnosing this issue as well as possible solutions would be greatly appreciated (more so if instructions are extra clear, as I am not very experienced).
Here are some more details:
Both machines are similar: Ubuntu 22.03, 16GiB memory, Intel Core i7 with 512GB of disk capacity.
The Google Drive is about 25GB
Here are some more symptoms:
When I disable the systemd service, boot time becomes again normal on both machines.
When I turn off WiFi before rebooting, boot time becomes normal. I turn on WiFi after reboot, but Files app is nonresponsive for a few minutes. When it becomes responsive again everything works as normal.
From the output of systemd-analyze you would not thing there is a problem; it returns:
Startup finished in 5.283s (kernel) + 5.790s (userspace) = 11.074s
graphical.target reached after 5.740s in userspace
Finally, here is a copy of my systemd service file:
Thanks for this suggestion, but this did not have any noticeable effect.
A few more comments:
Your suggested systemd file returned an error; my guess is that --vfs-fast-fingerprint wants an input (ran into a similar issue before; see my first reply here). However, vfs-fast-fingerprint=true works. The updated systemd file is below.
I think so: at least /usr/bin/rclone version returns rclone v1.65.1. Running the systemd file with just --vfs-fast-fingerprint gives an error after systemctl restart rclone-GDrive.service; namely Fatal error: unknown command "GDrive:" for "rclone" (which is why I thought that --vfs-fast-fingerprint eats mount as an input and then doesn't know what to do with GDrive:).
On the slow boot issue: I noticed another weird behavior. It seems like turning the machine off and then immediately back on while the rclone systemd service is active does not cause a slow boot. It is only when the machine is off for a while that the slow boot comes back (I first noticed this when turning the machine on in the morning).
Might be one of this issues that are never resolved as are not serious enough to justify spending long time investigating. 3 minutes delay when you start machine in the morning is not really show stopper.
Maybe one day you will have eureka and find out what it was:)
Thanks for this reply; it hadn't occurred to me that I could obtain a log file even when running from systemd service. I attach a portion of the log. rclone-slowboot.txt (1.4 MB)
It is full of things that look like this: