Originally Posted by maxolina
I have a question about the "REF Cycle Time" timing. I read somewhere that if you see it too low it might cause data corruption even if it appears stable in all tests.
Is this true? Or can I safely tweak it down as much as possible?
There are two timings related to the refresh cycle which "recharges" the tiny little memory capacitors that hold each bit of RAM value.
tRFC is the Refresh Cycle Time and is how long it takes to recharge the memory capacitors for each row.
This value needs to be high enough to make sure each capacitor gets enough charge. But, during the recharge time, the row is blocked from access and if the CPU is trying to access that row, it has to wait for the refresh to be done. If the refresh doesn't fully complete enough charge, some tiny capacitors could eventually fall below the threshold value that indicates they're a "1" and they would essentially lose their value and become a "0". This would be dropped bits.
So, a lower tRFC value increases performance, but if it's too low, then you can lose bits of memory over time. It's also likely that the DRAM voltage influences the recharge time (higher DRAM voltage may decrease the required recharge time allowing you to lower tRFC). It's also likely that the DRAM temperature affects the required tRFC value as a higher DRAM temperature can increase the leakage current (which is how these tiny memory capacitors slowly lose their charge and one of the reasons why they need to be recharged in the first place). So, I'd argue that you don't want to lower tRFC right to the very edge of function because if your DRAM sticks get a little hotter than normal (hot day in the summer or unusually RAM heavy application), you don't want them falling over the edge of stability.
tREFI is how long a row of memory capacitors can wait before they have to be recharged again.
So, tRFC is how long it takes to do a recharge and tREFI is how long until the next recharge cycle after just recharging. tREFI improves performance by making it larger since a longer tREFI causes the tRFC cycle (which blocks CPU access) to be run less often. But, if you make it too large, then some memory capacitors might lose too much charge before the next refresh cycle happens and thus lose their value. Again, a "1" would get dropped and become a "0".
To test for proper refresh, you need a test application that sets a whole bunch of values in memory (mostly "1" values probably) and then some long time later, tests to see if all the values are still set appropriately such that none of the "1" values leaked down to a "0". It appears that PassMark's MemTest86 might have a test that does something like that (it's the one that takes forever to run because it inserts delays while running the tests). It is unclear if the other popular test programs such as Karhu's RAMTest or HCI MemTest have specific tests for this type of thing.
So, what I decided to do was to be a bit conservative with both these values. I found the edge of stability under my normal operating conditions for tRFC using my normal testing tools and then I backed off from there to give myself some safety margin. I found that tREFI didn't seem to impact performance as much as tRFC so I didn't try to push tREFI much at all.
For my Samsung B-die at 4000MHz and 1.45V, I settled on tRFC of 280 and tREFI of 25000 as safe values.
As I said above, it's quite possible that these values are voltage sensitive so if you are running at lower DRAM voltages, you may need a higher tRFC.
If you look back in this thread at timing screenshots, you will see a wide variety of values for tRFC and tREFI. I've shared my recommendations and why - there are obviously many other opinions so you will have to decide what to go with yourself. And, a different type of DRAM (other than Samsung B-die) may require completely different values.
(-1 AVX offset) on ASRock Z390 Taichi
with Noctua NH-D15 air cooler
CPU offset voltage of -25mv, runs VRVout 1.240-1.313V on full AVX load, 1.225-1.275V on non-AVX load
2x8GB [email protected] at 1.45V
, G.Skill F4-3733C17Q-32GTZKK (XMP rated [email protected]
EVGA GTX 1060 6GB OC with Corsair RMx 750W power supply
Samsung 970 EVO 500GB NVMe boot SSD and four other drives all in a Fractal Design R6 Case