You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
union: doesn't support --fast-list which slows down vfs/refresh #3000
Doing a vfs/refresh remote command over a union with a remote take much time than over the remote.
I tried with the code but it's too much golang for my level 😅. Could it be that it is not using the -fast-list option with the remote through the union mount point? Maybe it's just a not covered case.
I notice this because I was getting timeouts with large folders if I mount the union instead the remote.
What is your rclone version (output from rclone version)
rclone v1.46
- os/arch: linux/amd64
- go version: go1.11.5
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux 4.20.8-arch1-1-ARCH x86_64
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
With the config:
[gdrive]
type = drive
client_id = ...
client_secret = ...
token = ...
[union]
type = union
remotes = /srv/data gdrive:/data
I am also seeing this behavior and I was about to log an issue over it. I thought it never completed. It looks like it does but takes a very long time.
to the config for the underlying remote in the rclone.conf and see a time difference as then it should use fast-list with the underlying remote that's part of the union.
to the config for the underlying remote in the rclone.conf and see a time difference as then it should use fast-list with the underlying remote that's part of the union.
In my use case I'm trying to union multiple Team Drives and I believe fast-list isn't recommended for Team Drives. The main advantage for me to use rclone union is I want a single systemd unit to manage it all vs mounting indv Team Drives and using something like Mergerfs to union them.
I think that depends on what you're doing against the team drives because of the delay in getting consistent reads.
"Warning: Rclone has detected that you’re using --fast-list with sync/copy/move to or from a Google Team Drive remote. Due to the way Team Drives currently cache the full directory listing there can be situations where Rclone is unable to see recently created files on the drive and cause the command to miss or re-copy files. Running the command without --fast-list should allow Rclone to properly detect all files on the remote. Waiting a currently unknown amount of time after a file has been uploaded (Estimated to be less than an hour) should also be effective."
I added fast_list = true to the Team Drive remotes and tried it. It seemed promising on team drives with little content. It took 5 mins for the refresh to complete on the small team drives however when I attempted it on Team Drives with more content it took over an hour. I can't tell you the exact time because I had the timeout set for 60 minutes and it timed out at that point.
to the config for the underlying remote in the rclone.conf and see a time difference as then it should use fast-list with the underlying remote that's part of the union.
@Max-Sum what do you think about this issue as the next thing to work on for the union backend? It would be super useful for people using vfs/refresh with the recursive flag.
Since both local and gdrive is used, I don't think my implementation could work though... @ncw Do you think iterating for upstreams without ListR supported is fine?
@rsierra Yes, we face a dilemma here. If we enable fast list only when all upstreams support fast list, it would be a pity for local+remote case. However, if we enable it when one of the upstreams support, it would create unnecessary requests to the unsupported upstream and possibly damage the performance.
I could make a compromise, enable fast list if all upstreams are in one of these cases:
@rsierra Yes, we face a dilemma here. If we enable fast list only when all upstreams support fast list, it would be a pity for local+remote case. However, if we enable it when one of the upstreams support, it would create unnecessary requests to the unsupported upstream and possibly damage the performance.
I could make a compromise, enable fast list if all upstreams are in one of these cases:
The other alternative would be to implement ListR for the local backend. This would probably be slightly more efficient than using walk.ListR on it and might be useful elsewhere
I've merged @Max-Sum 's fix to enable --fast-list when local backend is part of the union to master now which means it will be in the latest beta in 15-30 mins and released in v1.52
Activity
RXWatcher commentedon Feb 26, 2019
I am also seeing this behavior and I was about to log an issue over it. I thought it never completed. It looks like it does but takes a very long time.
animosity022 commentedon Feb 27, 2019
fast-list is a backend specific item so I'm guessing it wouldn't be on the union mount since not all things there would support it.
when you run the refresh on the Google Drive, which supports it, it works fast as it uses fast-list
fast-list itself does nothing on a 'mount' so it can be removed as well.
calisro commentedon Feb 28, 2019
I wonder if you could add
fast_list = true
to the config for the underlying remote in the rclone.conf and see a time difference as then it should use fast-list with the underlying remote that's part of the union.
#661
RXWatcher commentedon Feb 28, 2019
In my use case I'm trying to union multiple Team Drives and I believe fast-list isn't recommended for Team Drives. The main advantage for me to use rclone union is I want a single systemd unit to manage it all vs mounting indv Team Drives and using something like Mergerfs to union them.
calisro commentedon Feb 28, 2019
I think that depends on what you're doing against the team drives because of the delay in getting consistent reads.
"Warning: Rclone has detected that you’re using --fast-list with sync/copy/move to or from a Google Team Drive remote. Due to the way Team Drives currently cache the full directory listing there can be situations where Rclone is unable to see recently created files on the drive and cause the command to miss or re-copy files. Running the command without --fast-list should allow Rclone to properly detect all files on the remote. Waiting a currently unknown amount of time after a file has been uploaded (Estimated to be less than an hour) should also be effective."
https://forum.rclone.org/t/fast-list-overwriting-and-endless-sync-with-gsuite-drive/8718/18
If you're mostly reading from the mount I think you're fine. You could have two configs for the same remote with one just for the mount for reads.
RXWatcher commentedon Feb 28, 2019
I added
fast_list = trueto the Team Drive remotes and tried it. It seemed promising on team drives with little content. It took 5 mins for the refresh to complete on the small team drives however when I attempted it on Team Drives with more content it took over an hour. I can't tell you the exact time because I had the timeout set for 60 minutes and it timed out at that point.rsierra commentedon Feb 28, 2019
I've got the same response times with
fast_list = truein the config file 😢 .ncw commentedon Jan 24, 2020
That is exactly the problem... The Union mount doesn't support --fast-list.
[-]vfs/refresh time with a union mount[/-][+]union: doesn't support --fast-list which slows down vfs/refresh[/+]ncw commentedon May 9, 2020
@Max-Sum what do you think about this issue as the next thing to work on for the union backend? It would be super useful for people using
vfs/refreshwith the recursive flag.ncw commentedon May 10, 2020
@Max-Sum has just implemented this and I've merged it to the latest beta.
Please give it a go :-)
Max-Sum commentedon May 10, 2020
Since both local and gdrive is used, I don't think my implementation could work though...
@ncw Do you think iterating for upstreams without ListR supported is fine?
Visorask commentedon May 10, 2020
So it seems to work fine without local: Took about 10 minutes
2020/05/10 22:25:47 DEBUG : rclone: Version "v1.51.0-300-g54b16bd0-beta" starting with parameters ["rclone" "rc" "vfs/refresh" "recursive=true" "-vvv" "--timeout" "60m"] { "result": { "": "OK" } } 2020/05/10 22:35:26 DEBUG : 4 go routines activeWith local:
rclone rc vfs/refresh recursive=true -vvv --timeout 60m 2020/05/10 22:37:54 DEBUG : rclone: Version "v1.51.0-300-g54b16bd0-beta" starting with parameters ["rclone" "rc" "vfs/refresh" "recursive=true" "-vvv" "--timeout" "60m"]It's still running and I've had it running for about 20m now. So your theory on it not working with local is correct.
@Max-Sum
rsierra commentedon May 10, 2020
First of all, thx for the effort :-).
I have also repeated a similar test again and the result is the same (mounted with the beta):
Max-Sum commentedon May 11, 2020
@rsierra Yes, we face a dilemma here. If we enable fast list only when all upstreams support fast list, it would be a pity for local+remote case. However, if we enable it when one of the upstreams support, it would create unnecessary requests to the unsupported upstream and possibly damage the performance.
I could make a compromise, enable fast list if all upstreams are in one of these cases:
What do you think @ncw?
ncw commentedon May 11, 2020
That would work OK. You could use the
IsLocalflag onFs.Features()to do that detection - that is what it is for.Note that you can use
fs/walk.ListRto turnFs.List()intoFs.ListR().rclone/fs/walk/walk.go
Line 140 in bd4b91b
The other alternative would be to implement ListR for the local backend. This would probably be slightly more efficient than using
walk.ListRon it and might be useful elsewhereMax-Sum commentedon May 11, 2020
Thank you for your notice.
Wouldn't implementing ListR on local affect the performance for non-union users?
Max-Sum commentedon May 11, 2020
@ncw What about memory backend. I think turning on
IsLocalfor memory is ok?I am an idiot, memory already have ListR support.
ncw commentedon May 11, 2020
Done right it would increase performance... But it is probably hard to do better than the rclone version which uses multithreaded lists.
That is OK I think - I thought of doing it a while back!
ncw commentedon May 13, 2020
I've merged @Max-Sum 's fix to enable --fast-list when local backend is part of the union to master now which means it will be in the latest beta in 15-30 mins and released in v1.52
rsierra commentedon May 13, 2020
Great news! Thank you all!
union: enable ListR when upstreams contain local