If you have a server running on TrueNAS Core, and you are using ZFS RAID, you have probably noticed that the RAM is being eaten up by the ZFS cache.
This is a normal operation of ZFS, it will use as much RAM as possible for its cache, and if the system or a service needs RAM, it dynamically frees it
It is super important not to disable the cache, as this could cause performance issues, and possibly stability issues.
It is sometimes necessary to limit the RAM used by ZFS, especially in the case of unstable virtual machines, or as in my case of false alerts received because the RAM is used too much.
To do this, go to the TrueNAS management web interface, and go to "System => Tunables", and click on "Add"

Complete the information like this:
Remember to leave enough RAM for the cache.
- Variable: vfs.zfs.arc_max
- Value: Specify the size (for example I specified 36G (GB)
- Type: sysctl
- Description: description so you can recognize it

Once applied, it is necessary to restart TrueNAS for the setting to take effect.