vmware / open-vm-tools

Official repository of VMware open-vm-tools project
http://sourceforge.net/projects/open-vm-tools/
2.26k stars 427 forks source link

Slow performance on a vmhgfs-fuse mounted directory with items? #488

Open ssxcxS45XT opened 3 years ago

ssxcxS45XT commented 3 years ago

I have the following in line in /etc/fstab in a linux guest. The host is Mac OS X.

.host:/    /mnt/macosx        fuse.vmhgfs-fuse    defaults,allow_other    0    0

I see the following performance problem. Could anybody fix the problem?

On a mounted directory in the VM, here is the performance.

$ time touch {1..10000}.txt

real    0m13.987s
user    0m0.029s
sys     0m1.500s
$ time ls > /dev/null

real    0m24.516s
user    0m0.008s
sys     0m0.013s

In /tmp (not a mounted directory) of the VM.

$ time touch {1..10000}.txt

real    0m0.320s
user    0m0.016s
sys     0m0.301s
$ time ls > /dev/null

real    0m0.015s
user    0m0.010s
sys     0m0.005s

On the Mac OS X host, here is the performance.

$ time touch {1..10000}.txt

real    0m0.667s
user    0m0.034s
sys 0m0.613s
$ time ls > /dev/null

real    0m0.085s
user    0m0.071s
sys 0m0.011s
lousybrit commented 3 years ago

Hi there,

You first have to think of the Shared Folders as a network file system not a local file system. The VMware Tools shared folders client has to pass all file IO requests to the VM's host process which performs the file IO on the relevant host file system. It will return the results back to the VMware Tools shared folders client in the VM.

To make performance worse it is a FUSE client so the Linux VM file IO from user mode goes to the Linux VM FUSE kernel client before sending it to the shared folders FUSE client. An additional kernel to user transition for request and reply.

For example, you could compare a Samba mount to the host file system if you have time to set it up.

Having said that, I will file a request for the VMware team to look into this and see if they can do some improvements.

Thanks Steve

lousybrit commented 3 years ago

Can you specify the versions of Fusion VMware Tools Mac OS X ?

Thanks

ssxcxS45XT commented 3 years ago

VMware Fusion Player Version 12.1.0 (17195230) MacOS 10.15.6 (19G73)

ssxcxS45XT commented 3 years ago

Will using NFS mount from a host directory to the guest VM solve this slow access problem?

lousybrit commented 3 years ago

Using a mapping of an NFS mount from the Linux VM to the same host folder won't change the file IO times of the Shared Folder mounts but it will give a better comparison so that we can see if some particular file IO operations are bad or ok.

It could be due to a latency anywhere in the chain of operation, client to server in the host. Not just our FUSE client but it would be good to know if our client could be adjusted with better file IO handling.

451846939 commented 1 year ago

Has there been any progress on this issue? I'm facing the same problem.

lousybrit commented 1 year ago

Has there been any progress on this issue? I'm facing the same problem.

Sadly, no time and resources has been available to work on this.

AkramiPro commented 2 months ago

same issue here. any progress?

lousybrit commented 2 months ago

same issue here. any progress?

I'm sorry, but we are still trying to find and allocate resources for the Shared Folders feature. Thanks.