Excuse me,i hava a question
For example the following video example,No problem with right clicking on other types of files,but the exe is so slow
My reclone version:1.60
mount command: .\rclone.exe mount tx:/ Z: --network-mode --file-perms 0777
I guess it is because the exe file is being downloaded. This can be due to one of your Explorer addins, your antivirus or Windows finding digital signatures or similar in the file. I would expect the Explorer to unfreeze once the file has been downloaded.
You could add -vv to you mount command to see more details (if manually started in a terminal).
You may see better performance if adding --vfs-cache-mode=full.
Thank you Ole,I think I'm going to give up accessing mounted exe files on windows
I installed a blank windows virtual machine and turned off windows defender, it is still slow until it freezes
The --vfs-cache-mode=full parameter might work, but it also takes time to load the cache
Hi Ole,
I think you are right, the same running environment to access the exe is fast on linux but slow on windows, but strangely, when I use raidrive software to mount it doesn't have this problem, do you know my windows needs what settings to make to skip freeze?
To reproduce, first open Explorer and select the "rclone-v1.60.0-windows-amd64" folder and press Enter. Then select an ordinary file in the listing while being careful not to hover the mouse over the line with rclone.exe. Then use the arrow keys to select rclone.exe and wait a few seconds, then I see a period of approximately 30 seconds where the cursor becomes busy and Explorer shows "Not Responding" on and off.
I am using Windows 11 without any fancy addons and can confirm that it doesn't help to turn off thumbnails or built-in antivirus. It does improve the experience to add --vfs-cachemode=full, but it still takes 30 seconds from selection before you can right-click without freezing Explorer. Seems like Windows insists on reading app. 15MB which causes rclone to toggle between reading the head and tail of the exe file (if I am reading the log correctly).
It puzzles me that Windows does this in --network-mode, so there may be an issue with rclone. I have not been able to find a way to verify that Windows indeed sees the mount as networked (that is possibly slow with high latency and drop outs).
Perhaps somebody with better insight can reproduce and shed some light on this.
@asdffdsa
Hi Ole, jojothehumanmonkey
I think it is really reading my exe file information that is causing it to become slow.
Maybe it has something to do with the file manager, so I tried another file manager: files, its right-click menu doesn't read extra file info, it's fast as I thought.
Maybe this is also related to the way rclone is mounted, that as ole guess, although it uses the --network-mode parameter, I think Windows does not really regard the mount as networking, like in the picture below, the left is the windows self The dav connection with the belt, right-click it is fast, the right is mounted through rclone, it is slow, and through the properties view, you can see that it has a lot more information than the way windows mounts the network disk.
@asdffdsa@Ole
When I used windows to build smb network disks, I found that unlike windows mounting webdav, it read more properties, and unlike rclone cacheless mounting smb, the right click was only delayed for a moment. I wondered why windows mounting was faster than rclone. Then I tried to monitor their traffic, and found that when windows mounted smb in a native way, the exe file was still being downloaded by right-clicking, but the traffic was much smaller than that in rclone mode. Considering smb is a native protocol of windows, is there a separate space for storing file information and separate from the local file for windows to download and read?
You could try mounting rclone via webdav using rclone serve webdav. Use all the same parameters you've been using with rclone mount (eg --vfs-cache-mode). I wonder how that will perform.
I have tried to rclone mount jianguoyun:/ Z: --network-mode --vfs-cache-mode=full by mount, but it is still slow when there is no cache and more information than by windows mount,rclone's mount method can't seem to stop explorer from downloading file and getting info
I have tried rclone serve webdav --bwlimit=1M and see somewhat similar behavior, except it seems like Windows sometimes start reading the exe file as soon as the folder is opened and therefore may be ready if checking a few other files before right-clicking the exe (depending on bandwidth).
I can make it fast by enabling "Always show icons, never thumbnails" in the Explorer View options. I guess this eliminates the need to extract the icon from the exe.
This trick doesn't help (much) when using rclone mount --network-mode --vfs-cache-mode=full --bwlimit=1M
Thanks, but seems like my conclusion was too hasty.
A more thorough test shows that both webdav and mount will read the executable to extract the icon. This will happen with or without "Show thumbnails instead of icons".
Apparently Windows has some kind of (timed) icon cache that blurred my tests unless each action was performed with minimum 10 minutes delay.
Good question, it made me discover the above and investigate why Explorer behaves so badly when using rclone mount.
This is what Windows requests from rclone each time you hover, select or right-click on an executable like rclone.exe:
That is 4K from the start and 17K near the end of the file (probably the icon resource). This amount of data would typically be transferred quicker than the human reaction/detection time.
rclone however has a default --buffer-size of 16Mi, so it reads 16MB from the start of the file and another 16 MB from the end. That will roughly take the above mentioned 30 seconds to complete on my simulated 10 mbps connection. That is an effective transfer speed of 5,600 bit per second seen from Windows. This speed is comparable to some of the very first phone modems I used 30+ years ago, so I guess this would cripple any modern (Linux or Windows) program performing small random reads.
With this knowledge I tried setting --buffer-size=0 which effectively reduced the buffer to 32KB (on my machine). This made Explorer nicely responsive, even with thumbnails enabled. I was even able to do reasonable pleasant Explorer navigation on a simulated 1 mbps connection (starting with empty cache):
rclone mount --network-mode --cache-mode=full --buffer-size=0 --bwlimit=100K myOneDrive:testfolder/ Z:
I also tried a few other things (downloading rclone.exe and browsing a folder with photos). It was slow as expected, but I didn't see any negative consequences of the much lower --buffer-size. Performance also seem fine when using the mount with --buffer-size=0 on my full 600mbps bandwidth.
I guess this explains the much better performance seen with the default installation/usage of RaiDrive. RaiDrive probably doesn't try to read (as much) ahead as rclone does with default settings, and it also seems to enable a small read cache by default.
So these are the rclone settings that seems to match the RaiDrive default settings:
rclone mount --network-mode --cache-mode=full --buffer-size=0 ...
@wslrj Does these settings improve/solve your issue?
A closing remark for the technically interested: I also briefly tried the same trick with rclone serve webdav, and that wasn't a success. Seems like the whole file is being downloaded irrespective of --buffer-size, I didn't investigate why or any details. That will be a challenge for somebody else.
both webdav and mount will read the executable to extract the icon. This will happen with or without "Show thumbnails instead of icons".
Hmm didn't know that.
For me a 100MB exe responds instantly to both right-clicking and displaying file properties. But perhaps, as you've mentioned, the data is being cached too fast for me to notice. A 700MB exe on the other hand takes about ~1s to respond to a right click, then ~8s to display properties.
Handling that 700MB exe is the first time I've felt any lag while using these mount flags: --vfs-cache-mode full --use-server-modtime --network-mode
After clearing the cache and adding an additional flag of --buffer-size=0 the 700MB exe responds instantly to a right-click (reduced from ~1s), and takes ~4s to display file properties (reduced from ~8s). That's a really good improvement.
I am a bit puzzled by the 4 seconds to display file properties, is it a publicly available executable that I can test?
Not that I am aware of.
A typical pc can easily move data with the responsiveness needed to efficiently utilize networked storage, so I see no need for the additional rclone buffering on mounts.
Please let me know if you experience anything different.
I'm puzzled too. Wish I had other large executables to test.
The exe I used was an old version of ZBrush 4R4 — probably difficult to find now. Below is a GIF of me interacting with it via my Wasabi mount using these flags:
--vfs-cache-mode full --use-server-modtime --network-mode --buffer-size=0
Here's the log from one Right Click > Properties attempt.
For what it's worth I also tested this exe on a local HDD (WD Black 1TB). It responded instantly to a right click and instantly displayed file properties.
The delay on the mounted drive isn't a big problem for me personally, since I don't often interact with executables. But I'd be interested to learn why it happens.
You can see all the different file handles corresponding to the different opens by the OS.
The OS seems to read bits out of the first 32k 8 times! This isn't a problem it should be cached after the first read. It reads another 32k 3 times also.
As the reads are relatively close together you can see rclone just streams the first 900k of the file.
This means that the file bits are in cache very quickly - see the present = true here. Everything is in cache at 02:48:08 (when the read above finished) so <1 second after starting but the OS wasn't done with the file until 02:48:16 so there are 8 seconds of overhead.
2022/11/10 02:48:08 DEBUG : vfs cache: looking for range={Pos:0 Size:4096} in [] - present false
2022/11/10 02:48:08 DEBUG : vfs cache: looking for range={Pos:840192 Size:16384} in [{Pos:0 Size:32768}] - present false
2022/11/10 02:48:08 DEBUG : vfs cache: looking for range={Pos:872960 Size:15360} in [{Pos:0 Size:884736}] - present false
2022/11/10 02:48:12 DEBUG : vfs cache: looking for range={Pos:0 Size:4096} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:12 DEBUG : vfs cache: looking for range={Pos:0 Size:32768} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:12 DEBUG : vfs cache: looking for range={Pos:839680 Size:32768} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:12 DEBUG : vfs cache: looking for range={Pos:880640 Size:32768} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:13 DEBUG : vfs cache: looking for range={Pos:0 Size:32768} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:14 DEBUG : vfs cache: looking for range={Pos:0 Size:32768} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:15 DEBUG : vfs cache: looking for range={Pos:0 Size:32768} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:15 DEBUG : vfs cache: looking for range={Pos:0 Size:4096} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:15 DEBUG : vfs cache: looking for range={Pos:840192 Size:16384} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:15 DEBUG : vfs cache: looking for range={Pos:872960 Size:15360} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:16 DEBUG : vfs cache: looking for range={Pos:0 Size:4096} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:16 DEBUG : vfs cache: looking for range={Pos:840192 Size:16384} in [{Pos:0 Size:950272}] - present true
2022/11/10 02:48:16 DEBUG : vfs cache: looking for range={Pos:872960 Size:15360} in [{Pos:0 Size:950272}] - present true
Could you do this test again with more accurate timing? You can enable that with --log-format time,microseconds - then I can check which part of the open is causing the problem. I suspect it is the checking remote fingerprint and a more accurate timing will show that.
If it is, I don't think it would be unreasonable to cache these fingerprints. Exactly for how long I don't know but somewhere around --dir-cache-time maybe. Or maybe with its own parameter.
Perhaps @ncw can give a quick rundown of the drawbacks/risks.
Agree, Windows reads the same app. 35K several times. And the 35K comes from different parts of the file so 2-3 reads of the minimum buffer size (32768) from the remote is to be expected.
It does however puzzle me why rclone decides to stream the first 900k of the file, can you briefly give me a hint?
You see two actions in the log: The file is selected at 02:48:08 and Windows checks something (icon) behind the scenes. The right-click is happening at 02:48:12 and may be a combined select and right-click, driving the number of requests up. It takes 4 seconds with all content loaded from cache, so really only checking the fingerprint 13 times - 300ms per fingerprint.
Might be a very good idea to better support applications with high appetite on rapidly sniffing small parts of (executable) files.
However, not sure I understand the fingerprinting method and usage in relation to mounts well enough to comment on the best approach. Do we have a description of rclone's finger printing and especially the method used by --vfs-fast-fingerprint? something between the above link and the code (docs, forum posts, ...)
For mount sftp,why right click on exe file is so slow until it freezes - Help and Support - rclone forum.Right clicking on REMOVEDURL .exe files* or folders causes file explorer to freeze , on desktop as well as in the start menu and in a File Explorer window. If an app's added shell extension isn't working properly , it can cause a context menu to be extremely slow or freeze when you right click to ... file which is responsible for the context menu is actually still loaded, enabled and causing the right click to be very slow!
The other flags were kept the same: --vfs-cache-mode full --use-server-modtime --network-mode --buffer-size=0
I didn't notice that fast fingerprint was recommended for S3 (Wasabi), thanks for pointing that out! There's not much difference for me with it enabled, and I wonder if it's because I'm already using --use-server-modtime. They seem to do similar things, so maybe their effects don't stack very well