Slow load speed over LAN

I just started using NextCloud for my personal nas and I am getting really slow and unstable upload speed. I just set up my nas using the TrueNAS Scale system and installed and used this video:

to set up the nas for external users.
First, when uploading a 256gb folder to the nas using the file explorer and TrueNAS, it took 50 minutes to upload. then i went through NextCloud and uploaded (am still uploading) a 158gb folder. the file upload speed is fluctuating from 6 hours to 14 hours. What could be causing this and how can i fix it?

Thanks
TrueNAS 24.10
NextCloud 30.0.1

Hi and welcome to this forum!

Good questions. Lets me see if I can provide som calrifications:
First of all then uploading using file explorer and TrueNAS, you are using native storage tech (CIFS, NFS, NTFS or whatever). This effectively bypasses all Nextcloud indexing and cach building, unless you do this using WebDAV.

When you writes that you try to upload these files through Nextcloud, it is not clear in which way you means? The GUI? WebDAV?
In any case, then Nextcloud both indexes and fingerprints each file and any eventual subsequent folder and caches file information. This is done in two ways:

  1. At the time of upload IF uploaded using WebDAV, or through a Nextcloud Client (web GUI, Dekstop client/sync, android, iOS, whatever).
  2. When running the occ files:scan --all CLI command.

When Doing this, Nextcloud then creates entries in the database for each file and folder aswell as meta file information in the appdata foler.

So: 1 File upload=transfer time (interface dependant like protocol)+link speed+database write speed+disk write speed (if using BTRFS or ZFS, then writing is slower than if using EXT4 for example).

So several possible bottlenecks exists when uploading a huge amount of files, as well as an actual dependency to speed, infrastructure and resourceses available.

The recommended way for uploading huge datasets is actually the first way you did it, by transfering the files “outside” of Nextcloud to the data/intended user/intended file path, and then when done, run:

occ files:scan --all

The files:scan --all will fix any missing indexing, fingerprints and cache information.

It is not recommended to move huge amounts of files through the sync and upload features. Downloading huge amount of files is something else intirely, and should not be that affected.