# Union on Windows Slow start times

**URL:** <https://forum.rclone.org/t/union-on-windows-slow-start-times/29138>\
**Category:** Help and Support\
**Created:** [February 7, 2022, 2:44pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138 "2022-02-07T14:44:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 2:44pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/1 "2022-02-07T14:44:07Z")

</div>

#### What is the problem you are having with rclone?

Slow start times for films through a Union.

Movies are kept on Local NAS and Drive. Local NAS is mounted as V:\   
Drive is mounted as G:  
Union (of G: and V:) is mounted as H:

If I navigate and open a movie on Union (H:)  
-Movies on Local (or both locations) start in seconds.  
-Movies on Drive open in circa 20 seconds

By comparison movies opened in Drive/mount (G:) open in circa 8 seconds (quicker if in VFS-cache i.e. on subsequent plays).

I can't work out what's causing the discrepancy in load times between direct mount and Union Mount

Note: I'm using VLC to test the load times.

#### Run the command 'rclone version' and share the full output of the command.

```auto
rclone v1.57.0
- os/version: Microsoft Windows 10 Pro 2009 (64 bit)
- os/kernel: 10.0.19042.1466 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: cmount

```

#### 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`)

G: is mounted with BAT file:

```auto
Title "Media_VFS G: Mount"
@echo on
"C:\Program Files\rclone\rclone.exe" ^
mount ^
Media_vfs: ^
G: ^
--allow-other ^
--dir-cache-time 5000h ^
--drive-chunk-size 64M ^
--log-level INFO ^
--log-file="C:\Users\robev\.config\rclone\Rclone_Log_Files\Mount_Media_vfs.txt" ^
--vfs-read-chunk-size 32M ^
--vfs-read-chunk-size-limit off ^
--config "C:\Users\robev\.config\rclone\rclone.conf" ^
--poll-interval 10s ^
--cache-dir "C:\zzzRclone Cache\Media_VFS" ^
--vfs-cache-mode full ^
--vfs-cache-max-size 25G ^
--vfs-cache-max-age 5000h ^
--vfs-cache-poll-interval 5m ^
--vfs-read-ahead 2G ^
--log-level=DEBUG ^
--drive-pacer-min-sleep 10ms ^
--drive-pacer-burst 200

```

Union (H:) is mounted with BAT file:

```auto
@echo off
Title "TEST_TEST H: Mount"
@echo on
"C:\Program Files\rclone\rclone.exe" ^
mount ^
TEST_TEST: ^
H: ^
--allow-other ^
--log-file="C:\Users\robev\.config\rclone\Rclone_Log_Files\Media_UNION.txt" ^
--config "C:\Users\robev\.config\rclone\rclone.conf" ^
--log-level DEBUG ^
--cache-dir "C:\zzzRclone Cache\UNION" ^
--dir-cache-time 30s

```

#### The rclone config contents with secrets removed.

```auto
[Gdrive]
type = drive
client_id = **REDACTED**
client_secret = **REDACTED**
scope = drive
token = {"access_token":" **REDACTED**","token_type":"Bearer","refresh_token":" **REDACTED**","expiry":"2022-02-07T14:27:18.2103586Z"}

[Media_vfs]
type = crypt
remote = Gdrive:Media_Storage_crypt
filename_encryption = standard
directory_name_encryption = true
password = **REDACTED**

[TEST_TEST]
type = union
upstreams = V:\ G:\:ro
cache_time = 10

```

#### A log from the command with the `-vv` flag

[https://pastebin.com/ADZ1uTTj](https://pastebin.com/ADZ1uTTj)

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 7, 2022, 3:52pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/2 "2022-02-07T15:52:10Z")

</div>

hi,  
`--allow-other` does nothing on windows, as per the docs and debug log

for the H: mount,  
`--cache-dir` does nothing as `vfs-cache-mode=off`

---

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 4:31pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/3 "2022-02-07T16:31:19Z")

</div>

> [@asdffdsa](#):
>
> `--allow-other` does nothing on windows, as per the docs and debug log

Been meaning to take that out!

> [@asdffdsa](#):
>
> for the H: mount,  
> `--cache-dir` does nothing as `vfs-cache-mode=off`

Added it when I added the "--dir-cache-time 30s" as I wasn't sure if that went to Memory or disk. I'm assuming Memory?

I've removed both and still get the same result.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 7, 2022, 4:34pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/4 "2022-02-07T16:34:03Z")

</div>

> [@PepJr](#):
>
> 'm assuming Memory?

yeah, can be confusing, take a read of my post  
[https://forum.rclone.org/t/status-about-using-rclone-for-music-storage-playback-in-2021-access-times-improved/27648/34](https://forum.rclone.org/t/status-about-using-rclone-for-music-storage-playback-in-2021-access-times-improved/27648/34)

---

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 4:50pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/5 "2022-02-07T16:50:12Z")

</div>

I think I've found a culprit!

> --vfs-read-ahead 2G

I just left a video playing (made a brew) came back and reopened it and boom instant playback. Used Wiztree to see actual data size in the sparse files and 2GB was the magic number for instant playback.

When I take the whole line out I'm down to load times that are on PAR with the drive mounted directly. (8'ish seconds first play. And near instant start for subsequent plays)

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 7, 2022, 5:00pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/6 "2022-02-07T17:00:11Z")

</div>

not sure that should be the case,  
rclone uses chunked reading and playback should start quickly.

here a media file starts after five seconds.  
the mount command is using `--vfs-read-ahead=2G`

![image](https://forum.rclone.org/uploads/default/original/2X/1/1d3a61fca8437e52fa3bd5d71cc998a892ab60ab.png)

---

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 5:11pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/7 "2022-02-07T17:11:01Z")

</div>

It's starts in that time if it's I'm in the VFS mount (G: in my case), but from the UNION it is looking like it's that line.  
-I've tested it by looking at the size on disk of the file (in the cache folder) if I set the read-ahead greater than that size it opens slowly, if I set it under it open's instantly. Just tested on 10 files.  
-If I remove the line completely it functions as normal.

Have to be honest I copied that line (--vfs-read-ahead 2G) from @Animosity022 . Do I understand it correctly that by taking it out, my vfs cache is now just writing what it's using? so I'm a little more susceptible to network issues?

---

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 5:12pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/8 "2022-02-07T17:12:59Z")

</div>

Got to do the school run, but I'll recreate the error and post some clean log files later.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 7, 2022, 5:16pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/9 "2022-02-07T17:16:30Z")

</div>

> [@PepJr](#):
>
> I copied that line (--vfs-read-ahead 2G) from @Animosity022

good questions and just now i was looking at @Animosity022 systemd service files

noticed that for `--vfs-read-ahead`  
`rclone-drive.service` uses it.  
`rclone-movies.service` does not use it

---

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 7:20pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/10 "2022-02-07T19:20:18Z")

</div>

> [@asdffdsa](#):
>
> noticed that for `--vfs-read-ahead`  
> `rclone-drive.service` uses it.  
> `rclone-movies.service` does not use it

That would be analogous to my setup though:

- Rclone-movie.service, loads mergerfs = (my) "TEST\_TEST H: Mount", loads Union

- rclone-movies.service loads, mount (Drive/dropbox now) = (my) "Media\_VFS G: Mount", loads Drive mount

In both cases --vfs-read-ahead isn't part of the Union/ mergerfs. Just in my case it seems to be messing with the Union.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 7, 2022, 7:22pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/11 "2022-02-07T19:22:53Z")

</div>

thanks but i was/am hoping that @Animosity022 would see that and reply to my question  
and might know why, in your case, `--vfs-read-ahead` is causing an issue.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [February 7, 2022, 7:26pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/12 "2022-02-07T19:26:53Z")

</div>

The only thing vfs-read-ahead does is if you are sequentially reading a file, it'll continue to read further along until the file is closed. It doesn't impact streaming start time or not. I think I was testing it before I moved away from GDrive but I will probably just remove it as it's not really needed and with cache mode full, doesn't add a whole lot of value imo.

---

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 7:45pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/13 "2022-02-07T19:45:12Z")

</div>

Thanks both for weighing in. I'll mark the comment to remove "--vfs-read-ahead" as the answer for now then.

If you think its a bug do you want me to recreate and do some fresh logs? Happy to if it helps, let me know.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [February 7, 2022, 7:47pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/14 "2022-02-07T19:47:02Z")

</div>

I don't think vfs-read-ahead should/would impact anything.

I don't use Windows myself so not sure offhand.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 7, 2022, 8:01pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/15 "2022-02-07T20:01:59Z")

</div>

`--vfs-read-ahead` works fine on windows

---

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 8:51pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/16 "2022-02-07T20:51:16Z")

</div>

It's working fine for me on the mount. It's only when I access that mount though a Union it's causing an issue with slow video start.

---

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 8:57pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/17 "2022-02-07T20:57:40Z")

</div>

The logs I posted originally were for the Union Mount. Logs from the Drive Mount when I a) play the file through the mount (no issue) b) through the Union (Slow Start)

In both cases I'm navigating via Windows Explorer and opening with VLC.

[Open file through Mount pt1](https://pastebin.com/b7T7NdUU)  
[Open file through Mount pt2](https://pastebin.com/rTeLvLxu)  
[Open file through Mount pt3](https://pastebin.com/Sb5Ye5W6)  
[Open file through Mount pt4](https://pastebin.com/AU2yUw9j)

[Open file through Mount pt1](https://pastebin.com/2QVhFgcw)  
[Open file through Mount pt2](https://pastebin.com/QafFuwZ9)

Only if you're curious.. It's working without the flag, so I'm happy enough 🙂

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 7, 2022, 9:00pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/18 "2022-02-07T21:00:07Z")

</div>

fwiw, in general, for mounts that i stream from,  
--- do not use the vfs flie cache.  
--- do not use any vfs flags

---

<div class="post-metadata">

**Author:** ![PepJr](https://forum.rclone.org/letter_avatar_proxy/v4/letter/p/3da27b/32.png) [@PepJr](https://forum.rclone.org/u/PepJr)\
**Post date:** [February 7, 2022, 9:08pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/19 "2022-02-07T21:08:19Z")

</div>

One question related to the set-up, I don't think related to the particular problem, but ain't worth it's own post...

The Cache option when you create the Union in Rclone Config:

> cache\_time

What is being cached? Is it separate to the vfs cache and --dir-cache-time?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 7, 2022, 9:14pm UTC](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138/20 "2022-02-07T21:14:51Z")

</div>

never used the union remote  
and not sure it matters based on your union remote.

best to start a new topic, fill out the template and ask your question

[Next page](https://forum.rclone.org/t/union-on-windows-slow-start-times/29138.md?page=2)
