Skip to content

File copies using dd for cgofuse (memfs/ custom filesystem) are super slow on Windows 10 using PowerShell/MINGW64 terminal #86

@marius-enlock

Description

@marius-enlock

Hello,

I suspect that file writes are super slow on cgofuse windows.

I am running the following experiment on a Windows10 virtual machine with 16GB memory allocated.

I have run the memfs example and tried to issue a dd command for 1 GiB file from outside the filesystem inside the filesystem.
Note: bs=4096 has a similar speed, I just used 131072 as cp on linux deals in 128 KiB block size

dd if=~/Desktop/1GFile of=1GFile2 status=progress bs=131072                   119406592 bytes (119 MB, 114 MiB) copied, 13 s, 9.2 MB/s
926+0 records in
926+0 records out
121372672 bytes (121 MB, 116 MiB) copied, 13.4542 s, 9.0 MB/s

The dd command for files on the native filesystem has a copy speed of around 400MB/s.

A bit of context on how I stumbled on this issue:
I have a custom filesystem using the hanwen/go-fuse library, and on Ubuntu (fusermount3)/ MacOS(macFUSE) I achieve around 400-500MB/s speeds for copying a large file from outside of the filesystem to my custom filesystem.

However after I added windows support via winfsp (only using cgofuse when compiling on windows - the underlying logic is the same, it's just adapted to implement the cgofuse interfaces), I noticed that the speed for copying a large file from outside of the filesystem inside the filesystem is around 28-40 MB/s.

Edit:
I have tried the same experiment using memfs from WinFSP:

 net use Z: \\memfs64\test
 The command completed successfully.
ThrowAway@DESKTOP-L3GCCNG MINGW64 /z
$ dd if=~/Desktop/1GFile of=1GFile2 status=progress
31198720 bytes (31 MB, 30 MiB) copied, 5 s, 6.2 MB/s
68918+0 records in
68918+0 records out
35286016 bytes (35 MB, 34 MiB) copied, 5.92756 s, 6.0 MB/s

and the dd copy speed is very close to the one for cgofuse

Could it be because I am on a virtual machine? Could it be because of windows 10?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions