New pool massive lag on video reads

Hello everyone!
My Trunas Core machine is Ryzen 3 pro 3200GE, 16g of ram with a 10gig connection to my windows machine. I use my Trunas as a big HDD with redundancy for storage and for editing, not using any other features.
So I had a Z1 pool which consisted of 4 3tb WD red hdds, and I created a new pool of 3 10tb Seagate exos x16 and replicated my datasets to a new pool. New disks are much faster than old ones, but instead of speed boost I get a massive lag instead on reading video files. Like any mov prores with more or less high bitrate hitches massively. My old HDD in PC plays the same files with no problems. SMART shows no problems and trunas has no errors or problems on any disk.
I thought maybe I have not enough ram - for best cache performance I should have at least 32gb, but I tested speed on freshly restarted system when I had empty cache and tried smaller files - I still get massive hitches on files. I edited videos from my old pool with no problem, but on this one it’s unusable do to lags. Also did a CrystalDisk test and I don’t know what to make of it.
I already sold my old HDD’s, so I can’t migrate my pool to test disks outside of my nas.
Please help where to even start looking for the solution, because I’m quiet stunned and also not a big nerd on truenas)

How are the new drives connected? Any additional details on hardware setup would be appreciated.

Issues present only on playback or does copying to/from NAS also have problems?

My MB AsRock x470 Taichi Ultimate. Disks are connected directly to mb sata ports. Disks are also sata, not SCSI. I encountered no problem with copying yet. Maybe slower speeds on image sequenses, but I think it’s to be expected with a lot of smaller files through network.

Nas MB has 10gbit onboard and it connects to my PC through 10gbit pci-e card.

Any chance any of the drives are connected to the “2 x SATA3 6.0 Gb/s Connectors by ASMedia ASM1061” - I’m wondering if that could be causing some sort of issue. Nothing in the BIOS tells me which of the 8 sata ports are connected to the ASMedia chip vs the chipset proper…

…Unless the new pool is connected to the same ports that always worked just fine on the old pool - in that case I’m at a bit of loss.

No, disks are connected to sata 3,4,5, ASMedia are sata 7 and 8. Maybe I can run some test’s through shell to see some kind of latency on separate disk idk.

If this was all working on your previous setup then ignore what I say here.

Is there a chance that the issue is not with the NAS but with the way you are accessing the files? What I mean is, there is a difference between streaming (such as what Jellyfin/Plex do) and playing a video file directly off of a network share. In the latter case the video may hang or experience lag depending on the codec and how much data the video player has to seek through or buffer.

It was working all good with my old pool. Bitrate and codecs is not a problem, my main PC is more than capable of playing any file. I tested different files and even lower bitrate h264 files experience this lag.

Guys! Please, help me! I’m desperate and starting to question my life desicions already))

One more detail and IDK whether it metters or not, but when I migrated my dataset from old pool to a new one, I did a trick when you create new pool with 3 disks, so you can make it raid z1, and then I switched one disk off. I needed to do it like this to have enough sata ports for two pools in the same time. 2 satas for system ssd’s, 4 satas for old pool and 2 satas for new one. After I replicated old dataset to new pool, I unplugged old pool, connected 3rd disk to a new one and did ascrub. Maybe there is some other thing I need to do for files to get reshuffled between disks or something like this?

hopefully i understood all right, what you stated:
By moving from a 4-wide RAIDZ1 to a 3-wide RAIDZ1 , you already lose some read performance:

4-wide RAIDZ1: ~3 Ă— single-disk read speed
3-wide RAIDZ1: ~2 Ă— single-disk read speed
(due to less parallelism, so noticeably slower reads)

further, with your “trick,” you effectively created a degraded 2-wide RAIDZ1 and then filled it with data.
In that state, read performance is basically single-disk speed…, because ZFS has only two disks to work with and must reconstruct blocks that belonged to the missing disk.

Even if you later bring the missing HDD back online, TrueNAS (or ZFS) will NOT automatically rebalance the data across all drives.

The new ZFS “rewrite”- feature (which can force rebalancing) is not available in TrueNAS Core, since Core runs an older ZFS version.

Old 4wide raidZ1 had slower disks in it, around 100 mB per disk, but new one is 250 per disk, which is much faster and even with this speed it should be enough to read files without a lag.
IDK of course and it may sound silly, but I feel like TrueNAS could struggle with reading files if they are not stored properly between disks, like it may look for it where it should be ideally, doesn’t find it and then looks where it really is. Can this be the problem do you think?
Also, I think it’s time to upgrade to TrueNAS CE anyway. Is ZFS “rewrite” included in CE, or it needs some additional scrypt installation?

The most recent TrueNAS CE should allow the new “rewrite”-feature.

1 Like

Guys, thank you so much! I updated to CE, started zfs rewrite and it made the lag problem go away! Can’t say what specifically helped - the update or rewrite, and the rewrite is still going, but I checked the files that laged before every time and they just don’t anymore.

2 Likes