I’m trying to replace my samba server with Nextcloud.
The server itself runs fine for a while. Nicely working over webbrowser, phone app…
I now want to mount the server as an extended disk to my local clients (linux eOS). I’ve tried this with webdav, but this is extremely show to show the folder structures. Every click, about 10~20 seconds? To copy a file, it’s fast. I’m using fstab to mount it on boot:
I’ve installed the latest version, namely Nextcloud 24.0.3.
The database is mariadb 10.6
And I’ve just installed/enabled redis, instead of the APCu. But no change in the slow performance.
I’m running nextcloud in a virtual machine (LXC container) under proxmox. The hardware is an intel i7 NUC, with 2TB M2 SSD and 64GB memory. For this container, I’ve assigned 3 cores, and 4GB memory, 1TB of disk.
I don’t think it’s an issue with performance. When I browse over web, works great. I’ve rsync all my data into the server, and this was really fast.
I thought that samba wasn’t a good way to connect a client? That nextcloud wouldn’t pick up the files, and would have wrong UID/GID?
That’s why I moved to webdavfs. I’m not really fan of any protocol (webdavfs, samba, nfs…). As long as my linux client can mount and work with it.
If you want to improve the raw performance, you need to work on the database. A long time ago, I tried to max out the performance of a raspberry pi:
You probably find a few more reports here on the forum with setups more similar to yours. You have tools that can suggest parameters for your database (mysqltuner.pl, tuning-primer.sh). It can considerably improve, but because of the database overhead, it is always slower than SMB or SFTP. So on a local network, if speed is important, I’d keep SMB. For remote stuff sftp/scp. You can use it as external storage in Nextcloud, so you can combine both worlds. Or if it is enough, than it’s good with Nextcloud.
As rule of thumb, you should be able to get performances in the order of half the max network speed. For 100 Mbit/s → 5-8 MB/s (theoretical max: 12.5 MB/s).
I also have performance issues with WebDAV’s directory listing, despite caching and such. And like you, my raw performance when accessing a single file isn’t the issue. So I’ve done some monkeying around to bypass WebDAV. You are right that there are foot-guns:
Files that have been created or deleted on the backend will still show up as existent or otherwise incorrectly in Nextcloud until your next occ files:scan detects the change.
Files that have been updated on the backend will not give change/update notifications, probably not even in the next scan.
Files that have been moved or renamed on the backend will probably not end up with the same Nextcloud file ID after the scan catches up with them, which can break things like file sharing between users.
You’ll need to make sure the account that your clients use to access the backend has the proper permissions - it’s no use setting up ACLs in Nextcloud if the users can get to the whole share directly.
So it’s up to you whether you want to put up with those when allowing your other client machines to access the backend storage.
Now, all of this might be alleviated if you’re using a Windows computer as the SMB/CIFS server, as noted in the docs, but the Samba software that you’d use to host files from Linux does not work that way IME. I’ve tried this on Ubuntu 18.04 and 20.04, though not on the latest 22.04.
Using the sync client to sync only some of your files is an option for interacting with those files, but doesn’t solve the problem of being able to access all of your files. The new Virtual Files feature is awesome, but it’s Windows-only for now.
Virtual Files on the Linux side probably requires FUSE, and if it’s also going to be integrated with file managers like it is on Windows, will require specific work for Nautilus, Dolphin, etc.
Oh. I thought virtual files were also available under Linux. Also, I would have expected that virtual files might require something like WebDAV and not FUSE, which would actually be a standard feature.
It’s Windows only for now (end of the What’s New paragraph in the announcement).
I think it would need to use both WebDAV and FUSE: one to connect to Nextcloud server on the back-end, and the other to present a cached version of that to the user’s file manager. On Windows side, Windows Explorer has a built-in functionality that does the work that FUSE would do on Linux.