I’ve been using the Snap version of Nextcloud for over a month now and I’m happy with the user experience, but not with the performance of NC. I am looking for a way to boost it up, since I don’t think that I’m hardware limited:
Environment:
Ubuntu VM (ESXI host)
12 CPU cores (E5-2699V3)
16GB of ECC RAM
128GB SSD for the Ubuntu VM
Everything is connected with CAT5E cables and gigabit switch, so I’m not limited by the network.
Storage is attached via NFS mount which is shared via the network from TrueNAS. The TrueNAS has 32gb of memory for caching and 2x3TB drives which are in RAID 1. On this same TrueNAS, on the same disks I have SMB share which I’ve created just for the test. I can read/write on it with over 100MB/S without issues. In comparison, the best speeds I’ve got with Nextcloud are 25MB/S and those speeds don’t even hold for too long. Usually I get around 10-12MB/S.
The Snap package has not been manipulated in any way from me - everything I’ve done was performed from the NC interface. Are there any logs which I can provide that can shed light why I have such a terrible performance with the product and is there anything I can do to increase it?
CAT5E is not the issue, since in a short cable run, CAT5E is definitely capable of pushing 10gbps. However,
1 Gigabit → 125 Megabytes
A Standard 3.5inch HDD can read or write at around 250 Megabytes. And with TrueNAS, where ZFS will use a portion of RAM as cache, it can even MAX out a 100gig Network with ease.
Another Off Topic Question,
TrueNAS Scale allows QEMU VMs, I have personally used TrueNAS Scale with 16GB RAM and there, Ubuntu (VM) + Snap NextCloud performed satisfactorily. I wonder why dont you deploy the Snap Nextcloud as an Ubuntu VM on that TrueNAS Scale Server itself?
Saying this, then quoting the parameters of my setup, and then reading that I am able to max ~10/15MB/s in Nextcloud, while I can do over 100MB/S on SMB or NFS is the definition of a bottleneck caused by NC, not by network limitation for what I am trying to achieve.
It may be misconfiguration by my side - sure, but running 10MB/S max on a gigabit network with such capabilities is not a limitation from the network. I don’t know where did you pulled that off.
Bottom line is, SMB and NFS vanilla setup gives me 10x the speed without any issues, and currently I do not need NCs perks to attempt to set it up correctly.
TrueNAS / ZFS will use RAM cache and it will time to time write RAM Cache data out to it’s designated storage pool. If that Storage pool doesn’t have a secondary SSD cache, HDD I/O will get affected during that cache off load.
Testing things with iperf or simple a SMB network read/write doesn’t show the complete picture since TrueNAS / ZFS doesn’t offer user configuration for when that RAM (Write) cache gets off loaded to your storage pool.
There are a lot of variables here even before talking about Snap / Nextcloud
One may need to do a bit of troubleshooting before arriving to the actual issue.
I assume iPerf test between ESXi Guest to TrueNAS is giving full gigabit so one of the off topic question in my above post is a suggestion to eliminate some of these variables in the attempt to find the actual root cause by hosting the Ubuntu / (Snap) Nextcloud on the TrueNAS Scale server itself (just for testing purpose) while following the same SMB/NFS network mounting process as done in ESXi
The NFS speedtest was perfmormed from the same VM that was holding NC at that point of time. That alone really cuts the majority of the other components which may slow down the connection (such as the hypervisor).
I forgot whether that was before or after my attempt to run NC via Snap, but I also tried it via docker (I can’t say anymore which container I used), but the result was equal.
I have used NC for about a month, without seeing higher speeds than the ones I shared. That was over a year ago and since then I’ve been using NFS and SMB for my needs, and I am yet to see such speeds. While initially I tested SMB and NFS just for a couple of hours, I’ve been using them enough now to conclude that they indeed give me that performance out of the box - this isn’t just a 5gb file transfer test result.
After TrueNAS EEL comes out I might give another try, just for the sake of tests, but for now really, a couple of network shares give me all I need.