After installing FreeNAS recently, I suddenly recalled the horrors from my experience with PC memory errors. Once upon a time, I had been very perplexed by frequent crashes of my Linux server until it finally dawned on me to test the RAM for errors. It turned out that I indeed had defective RAM modules.
My FreeNAS system is installed with two sticks of Kingston DDR4 2400 MHz 16 GB memory modules, for a total of 32 GB of system memory. It seems like a rather generous amount, but ZFS, the file system used by FreeNAS, is known to be quite memory hungry.
A rule-of-thumb for ZFS is 1 GB of RAM per TB of disk space. By this rule, a ZFS pool comprising 12 TB of total disk space will require 12 GB of RAM. In this situation, 16 GB of RAM doesn’t seem all that generous after all, particularly if you want to consider future grown in the disk pool capacity, something that is very likely to happen.
Furthermore, I plan to run some Linux virtual machines in this box. Therefore, 32 GB would be the most logical sizing for me.
If you read the FreeNAS community discussions, you’ll hear one camp strongly advocating use of ECC memory. In fact, this is officially listed as recommended minimum hardware. The other camp, however, says you’re not worse off using ZFS when you don’t have ECC memory. Regardless, it’s important to understand that good RAM is critical for the integrity of your stored data.
I decided not to use ECC. It’s not just the cost of ECC, but also the necessity of needing a motherboard supporting ECC, and a CPU that supports ECC.
Without ECC, it would be prudent to at least thoroughly test the RAM modules. For this task, there’s the renowned MemTest86 tool. Download the USB image, write it into a USB flash drive, and boot it up. Yes, you don’t even need to have an OS installed in your computer to run MemTest86.
Since the last time I used MemTest86, it now has a new test, the Hammer Test. This test attempts to check if the RAM is susceptible to row hammer problems. In layman terms, frequent repeated activations of a memory row may causes disturbances in an adjacent row, possibly inducing bits to flip in that adjacent row. This has been shown to happen with DDR3 RAM chips. You can read about Row Hammer on Wikipedia.
I ran MemTest86, and the two sticks of Kingston RAM modules passed completely. I specifically reran Test #13, the Hammer Test, twice. Those also passed.
I hope this should mean that the RAM I have is good, and safe. The Kingston part number, if anyone’s interested, is KVR24N17D8/16.
Most people likely never worry all that much about their computer memory. However, knowing about Row Hammer does raise concern about integrity of data in your RAM. This notwithstanding, I strongly recommend that you always test your RAM with MemTest86.