Playback in Davinci choppy - Bad Performance editing 4k 120fps video

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
Hi!

I'm trying to use a Truenas Core Server as a NAS to edit video from. But when adding a 4k 120fps video into the timeline, the playback is choppy, around 10fps, it works fine up to 4k 60fps though. But when trying to play the 4k120 clip, the network activity doesn't go very high, it's maybe a problem of the SMB protocol?

-The Mac Studio where I'm editing is capable of playing 4k120fps clips, if I copy it to the local disk, it plays fine
-The network connection between the Truenas server and the Mac is almost 10Gbit/s
-Tried with 1500 and 9000 MTU, all the test here is with 9000 MTU though

Here are the specs of the Truenas server:

CPU: Intel 6700K @4.0Ghz 4c/8t
Overkill CPU cooler, heat is not a problem
RAM: 64GB
NIC: 10Gb Asus XG-C100C

Pool: 2x Crucial P3 Plus 4TB M.2 PCIe Gen4 in Mirror

Iperf3 test between the server and a Mac Studio with 10Gbit NIC. As you can see pretty much perfect 10Gbit, I don't even need to test with parallel connections.

Truenas as server:
Screenshot 2023-11-07 at 13.57.59.png

Truenas as client:
Screenshot 2023-11-07 at 13.58.07.png


When using black magic speed test the reads are really low, but I believe it may be a problem with the app itself:
1699362489866.png


After a couple of runs it speeds up the reads:
1699362538495.png


When doing a real life example copy to the server it takes 10 seconds to copy a 10GB video file. It also takes 15 seconds to copy it back to the mac. So that's fine.

The only problem I've encounter is when using it to playback a video in the timeline using Davinci Resolve 18.

I've recorded a video with an example of it happening, the 4k120fps clip from the NAS gets like 10-12 fps, and the local one plays fine (in the recording it might have some hiccup as I'm recording at the same time, but plays fine if under normal circunstances)
The first clip is from the Truenas Server, mounted as an SMB share. The second one is the same clip but stored locally.
I've also overlayed the network activity of the Truenas server in real time in the video, they are really low even when the server is capable of way more.


This is the original 4k120fps video used in the example:

As you can see I'm not even trying to scrub though the video, just normal playback from the start of the clip. I believe it also must be cached in ARC as I have 64GB of RAM and I've been using those video files a lot.

Any clue?
 
Last edited:

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
Reporting back, testing with AmorphousDiskMark over SMB I got really slow results, 40-50MB/s reads and writes.

Just tested over NFS, worked much better at 300MB/s, enough for the files to play smoothly without proxies. So kinda fixed but I wonder why SMB was working that bad and why NFS still doesn't get closes to 1GB/s as the nvme are more than capable even if not hitting RAM
 

epycjay

Cadet
Joined
Nov 8, 2023
Messages
5
hey there - i am actually having the same issue trying to edit 8K RAW footages off my Canon R5 from a newly build truenas core. So changing from SMB to NFS improved performance?
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
hey there - i am actually having the same issue trying to edit 8K RAW footages off my Canon R5 from a newly build truenas core. So changing from SMB to NFS improved performance?
Yes, at least on mac, I haven't tried on windows yet. I mounted the share using NFS v4 (I enabled it on the NFS service config on Truenas), and added it to mac using this guide https://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/
From 50MB/s read playing from the timeline, to 300MB/s, which makes it playable now.
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
I'm no mac user, but i remember that smb on mac uses sync=always which slows down the share a lot. Have you tried disabling sync?
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
I'm no mac user, but i remember that smb on mac uses sync=always which slows down the share a lot. Have you tried disabling sync?
I have it disabled on the truenas side. Do I need to change any config in mac?

1699522830697.png
 

asap2go

Patron
Joined
Jun 11, 2023
Messages
228
I'm no mac user, but i remember that smb on mac uses sync=always which slows down the share a lot. Have you tried disabling sync?
There were also bugs where the Mac smb implementation would overwhelm ARC with millions of (prefatch?) requests.
That is being worked on by ix-systems I believe.
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
There were also bugs where the Mac smb implementation would overwhelm ARC with millions of (prefatch?) requests.
That is being worked on by ix-systems I believe.
Would maybe Scale would work better than core then? How easy is to change from core to scale (and then back just in case)?
 

asap2go

Patron
Joined
Jun 11, 2023
Messages
228
Would maybe Scale would work better than core then? How easy is to change from core to scale (and then back just in case)?
I don't know. Scale has some improvements regarding SMB. But no idea if that solves your problem. I think @anodos was involved with SMB on Mac discussions.

Core -> Scale easy. Just click upgrade.
Jails and Plugins need to be done manually though. Everything else is automatically migrated.
Scale -> Core idk. Never tried
Maybe restore snapshots and reset boot image back to last Core version.
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
I don't know. Scale has some improvements regarding SMB. But no idea if that solves your problem. I think @anodos was involved with SMB on Mac discussions.

Core -> Scale easy. Just click upgrade.
Jails and Plugins need to be done manually though. Everything else is automatically migrated.
Scale -> Core idk. Never tried
Maybe restore snapshots and reset boot image back to last Core version.
are the ZFS versions of core and scale the same?

I don't have any jails or plugins as I use it only as a NAS. I do have a wireguard script in the init to connect to a remote server, and replication task, as well as share. Are those preserved?
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
iirc there is a known issue with SMB and Mac: afaik steps to mitigate it have been taken, but I don't think it has been completely resolved... I believe some of those have been implemented in the latest SCALE release (Cobia). as asap2go said, anodos is your lighthouse in this regard.

As a side note, you might need more RAM to edit 4k120fps footage... you want to have your entire working set in ARC.
It may also be a GPU issue.
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
iirc there is a known issue with SMB and Mac: afaik steps to mitigate it have been taken, but I don't think it has been completely resolved... I believe some of those have been implemented in the latest SCALE release (Cobia). as asap2go said, anodos is your lighthouse in this regard.

As a side note, you might need more RAM to edit 4k120fps footage... you want to have your entire working set in ARC.
It may also be a GPU issue.
I have 64GB of RAM and the project files are usually less than that as I'm editing short form content at the moment. Also, don't you think 2xNVME in mirror should be enough for 4k120fps? I think the network would be a bottleneck (10Gbit) before the drives.

I'm using the NAS for other stuff, so the ARC is going to be used for other stuff as well, torrents, backups/time machine, media server. But the underlying disks for that services are in a different pool.
 
Joined
Oct 22, 2019
Messages
3,641
@bullerwins

Two things to test and consider:
  1. Your profile avatar is misleading. Every post you write makes the reader believe there are no issues. (Maybe try an angry face? Or at least a "meh" face?)
  2. Rule out the software. MPV is available on macOS. I would simply try to play a video using MPV over the SMB and NFS shares (with or without hardware acceleration enabled). Is the video choppy? Don't worry about network speeds. Simply observe if the video is choppy when playing it over SMB / NFS.
 
Top