Score:0

OpenVPN to SMB mount on Ubuntu extremely slow (10+ seconds to run ls)

ke flag

I'm trying Linux out as my desktop. I routinely use OpenVPN and from Windows this is no problem. The connection over the VPN sits around 1MB/s which is more than enough for the typical document editing I do. I usually mount a share and then open that in Visual Studio Code.

I'm doing the same thing on Ubuntu but the share is extremely slow. Running an ls hangs for seconds before returning, changing directories in VSCode takes 10s of seconds, and I haven't actually been able to get VSCode to create a file.

I have it open at the path: /run/user/1000/gvfs/smb-share:server=<server_ip>,share=<share_name>

Has anyone seen this and fixed it? Any suggestions on troubleshooting as far as figuring out exactly where the latency is?

Note: I have pulled out my Windows laptop and everything works as expected. Instant response, no lag, etc so I am highly confident the problem is OS side.

Score:2
es flag

gvfs ( gio ) has a lot of overhead. CIFS is controlled by the Linux kernel and is more efficient so you might want to see if cifs results in better performance.

Make sure a cifs helper program is installed:

sudo apt install cifs-utils

Create a mount point - for example:

sudo mkdir /mnt/ServerShare

Then do a temporary mount using cifs:

sudo mount -t cifs //<server_ip>/<share_name> /mnt/ServerShare -o username=XXXXX,password=YYYYY,uid=1000

The XXXXX / YYYYY parameters are what the server is expecting and 1000 is your ubuntu uid number - you can also use your ubuntu user name ... like uid=morbius.

If that works better you can have this automount in fstab if you want.

If it doesn't improve things you can unmount with a: sudo umount /mnt/ServerShare

Grant Curell avatar
ke flag
I'll give that a shot this afternoon - that's what I normally do but since this isn't a lab and I'm using passwords I care about I had forgotten how to securely mount it such that my password wasn't just sitting around in /etc/fstab. I'll go look it up this afternoon
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.