Wanted to add a list here of my custom configs that I use to change how TrueNAS Scale uses RAM. Basically linux ram could be as high as 2x usage then what its expected due to fragmentation, so this commit updated RAM usage in Linux ZFS to only 50%. This fragmentation is a worst case scenario, so I normally allocate it to 80%. Especially on high ram systems.
I also really like adding in more metadata in the arc talked about in this post here:
My ZFS parameters
Warning: Do this at your own risk, these are for my 128 gig setup, you will need to change the values according to your setup