sailchip.cc | Atom feed

Choosing RAM

2023-07-18

Your choice of RAM has big effects on your build’s performance and reliability. Unfortunately, it often involves some guesswork.

The likes of Corsair, G.Skill, and Teamgroup don’t do the most interesting work here. Instead it’s SK Hynix, Samsung, and Micron. The latter companies make the RAM dies (really more than the dies, but that’s the most common way to refer to them at this level) which the former companies then package into sticks of RAM you can buy and use. A Corsair RAM stick using Hynix dies behaves much more like a Teamgroup stick using Hynix dies than like a Corsair stick using Micron dies. The guesswork is because the companies like Corsair, G.Skill, and Teamgroup not only won’t tell you which dies they used, they’ll often use a mix of dies in the same model so you can’t tell what you’re buying.

As before, I’ll go through all the criteria and then list some kits that fit at the end. Also as before, this is mostly not for heavy overclockers, who may have some more complex criteria than I want to get into here.

Capacity

Having more RAM than you need doesn’t help much of anything. A system with 14 out of 16 GB used and one with 14 out of 32 GB used will feel basically identical. On the other hand, if you need 18 GB and only have 16 GB, it’ll probably be a bad time.

For most gamers, 32 GB of RAM is comfortably overkill and should stay that way for a long time. Modded Cities: Skylines is the only current game I know of that can semi-regularly feel limited by 32 GB (if you know of any others I’d like to hear about them). It probably won’t have much company until 2027 or beyond.

16 GB is usually fine, but with a few more caveats. You may have to tweak settings on some games, having lots of stuff running in the background might be a problem for some games, the list of troublesome games is a bit longer, and the list of troublesome games is likely to keep growing steadily from here.

There are occasional reasons you might need more than 32 GB (sometimes much more), but if you don’t know if any of these reasons apply to you they almost certainly don’t. 32 GB is a lot in most contexts beyond gaming too. If you need more than 32 GB chances are still high that you don’t need much more, and 48 GB is now a first-class option for DDR5 (unlike 12 and 24 GB or other non-power-of-two sizes historically).

If you’re using Linux, you have access to excellent memory compression (using zram as swap). In many cases this lets you act as if you have twice to three times as much RAM as you actually do without even much of a slowdown (and I’ve abused this for real world work on several occasions so I can confirm it lives up to the theory). Windows theoretically has memory compression, but I haven’t been able to find many practical gains from that implementation.

DDR4 versus DDR5

Usually your choice of CPU locks you into one of these or the other, but current Intel CPUs give you a choice. (You still have to pick a motherboard that supports the right one.) When DDR5 first hit the market it was much more expensive than DDR4 and didn’t give much performance improvement, but it’s progressed a lot on both fronts and now I’d nearly always pair Raptor Lake with DDR5. In most cases where Raptor Lake plus DDR4 sounds like a potentially good setup I’d drop back to Zen 3 instead.

Logical layout

In short, you probably want two sticks of 16 GB each for DDR5 or two sticks of 8 or 16 GB each for DDR4.

Channels

You need at least two sticks of RAM for full performance on modern platforms like AM5 or LGA1700, to get dual-channel operation for DDR4 or quad-channel operation for DDR5. Having only one stick means you’re missing half your throughput.

Ranks

Adding more sticks beyond this adds to ranks instead of channels. Having more ranks can help performance slightly with DDR4 (more work can be in-flight at once), but mostly doesn’t with DDR5 (which can keep huge amounts of work in-flight at once already). In both cases having more ranks limits the maximum frequencies you can reach, so builds with unusually large amounts of RAM usually can’t access that RAM as fast.

Having more capacity per stick doesn’t always work around the speed problems, because a lot of higher-capacity sticks (32+ GB for DDR5 and 16+ GB for DDR4) are internally dual-rank, much like having two sticks compacted into the form factor of one. This still tends to be cheaper than using four lower-capacity sticks.

x8 versus x16

Most desktop RAM sticks get their 64-bit interface to the memory controller by using 8 RAM packages which each have an 8-bit interface, which we call x8. Some instead use 4 RAM packages each with a 16-bit interface, which we call x16. For reasons too complex to get into here, x16 is slower. It performs a lot like having half a rank would if it were possible.

8 GB sticks of DDR5 are as far as I know all x16, and that’s the only place you’re likely to find x16 in desktop RAM. This is why if you’re building with DDR5 you should usually get at least 32 GB of it.

Frequency

Moving back into things you can find on a spec sheet, you’ll find a frequency (probably between 4800 and 8000 MT/s for DDR5). In the average workload the frequency doesn’t matter much, but when you find a workload where it does matter it tends to matter a lot. Some kinds of work more likely to care about it are:

The more cores you have, the easier it is to run into RAM throughput limits.

What frequency you want to aim for varies depending on your CPU:

Two or more ranks with DDR5 or four ranks with DDR4 will put some harsher limits on frequencies, but I don’t know enough of the details there to recommend anything for those setups.

Timings

Also on a spec sheet you’ll find a string of timings like 32-36-36-76. These are tCL-tRCD-tRP-tRAS. These are latencies measured in clocks, so lower is better. Since they’re measured in clocks instead of nanoseconds, they scale with frequency: tCL 30 at 6000 and tCL 34 at 6800 are both 10 nanoseconds.

Lots of workloads are affected by tCL and tRCD a little bit, but games are usually the most dependent on them. Again, not all games care, but enough do to make it a big deal. Unlike frequency, tCL and tRCD are most important when you have few cores.

tRP and tRAS are usually fine to ignore. tRP is usually set the same as tRCD but much less important. tRAS has more variance, and may affect gaming and multitasking performance slightly on Intel CPUs, but is unlikely to on AMD CPUs (because AMD CPUs also use tRC, a fifth timing that Intel CPUs skip).

Intel XMP versus AMD EXPO

RAM kits seem to only support one of XMP or EXPO, never both, but motherboards (both Intel and AMD) support both so it doesn’t much matter which one you get. EXPO has some solid advantages on paper, but those advantages don’t seem to be used very well in practice. Get whichever kit otherwise does what you want and don’t worry about whether it’s XMP or EXPO.

Binning

The trickiest thing the kit manufacturers (like Corsair, G.Skill, and Teamgroup) have to do is binning. Not all of the dies of the same type are capable of exactly the same things, and binning is all about sorting those unknown dies out into kits with appropriate XMP/EXPO profiles.

Performance per dollar and reliability are opposed goals here. If you as a manufacturer sell kits with XMP/EXPO profiles out at the very limits of what the dies you’re using can handle, you can sell better-performing kits for the same money, but some of those kits will be unstable in practice. Maybe some of the CPUs or motherboards they’re paired with aren’t perfect, maybe there’s some EMI or wonky power delivery, maybe the RAM gets blasted with GPU exhaust a bit too hard, or maybe the dies just degrade a bit too quickly after leaving your factory. One way or another, the chaos of the real world is a tougher environment than your test bench.

I’m skeptical of G.Skill’s binning. Three of the four kits of G.Skill RAM (all different models) I’ve bought in the last 6 years have been binned with extremely slim stability margins, and at least two of those three kits were in fact unstable at XMP in my first use of them. The third was ambiguous (that one was from 2017, before I was as careful about testing). I don’t have as much experience with other kit manufacturers.

There are some hints that (at least for DDR5) Corsair tries for the cushiest stability margins of the big three kit manufacturers, but one of those hints is that they often use higher voltages than the others for the same frequency and timing bins. This keeps the chance of problems to a minimum in the first few years of use, but their 1.4+ volt kits might not be a good choice if you like to keep using your builds for 7+ years.

If you’d rather err more on the side of reliability at a small penalty to performance per dollar, there aren’t always kits you can buy that will clearly get that job done, but you can run kits slightly slower than their XMP/EXPO profiles would for the same effect. For instance, if I’m not doing any special testing I’d usually rather run a 3600 16-19-19-39 1.35V kit at 3533 16-19-19-39 1.35V instead (due to how the timings work this gives it a bit more margin in the timings as well).

Common bins and dies

DDR5

For DDR5, you probably want one of the Hynix dies. They give the best timings and practical performance and in lower bins they’re not much more expensive than the alternatives. In lower bins they also usually have lots of voltage headroom and are the most likely to have significant frequency headroom, which is good for both reliability and overclocking.

The Micron and Samsung alternatives are decent, but there’s not a lot of point in them while the low Hynix bins are as cheap as they are.

For the moment (this will change as a wider variety of DDR5 hits the market) the internal differences in each manufacturer’s lineup aren’t very impactful or easy to see, so I won’t bother differentiating them in the table below. Who made the dies is the important part. If you’re an overclocker, you might seek out Hynix A-die (as opposed to M-die), but even there the differences are small and I don’t know of a very good way to distinguish them before buying.

Some common DDR5 bins are:

frequencytCLtRCDlikely dies
560028-3234-38Hynix
600030-3236-40Hynix
64003238-42Hynix
68003440-45Hynix
720034-3642-48Hynix
56003636Samsung
600036-3836-40Samsung
640038-4040Samsung
56004040+Micron
600034-4044+Micron
640036-4046+Micron
68004050+Micron

DDR4

DDR4 mostly falls into three categories:

One important exception is Klevv. I’m not clear on their exact relationship to Hynix, but the important part is that they only use Hynix dies and current-production Hynix DDR4 (CJR and DJR) is fairly good. They sell cheap kits that don’t suck.

Kits

I’m including links and prices here for quick reference, but many of these kits have subtle variants and the prices shift around a lot. G.Skill is particularly bad about this with their Ripjaws S5 kits. If you look on your own for kits that fit the descriptions, you may be able to find something cheaper, especially if you’re not in the US (the market I’m most familiar with).

For 32 GB with 6- and 8-core Zen 4 CPUs (or as a good budget option for Raptor Lake), Hynix-based kits at 5600 are the best bet. (You could go to 6000 if you really want to, but the performance gains are tiny and Zen 4 has a lot less stability margin at 6000.) Examples include: TEAMGROUP CL32 1.2V ($85), G.Skill CL30 1.25V ($98), G.Skill CL28 1.35V ($98), PROXMEM CL28 1.35V ($105).

For 32 GB with 12- and 16-core Zen 4 CPUs, Hynix-based kits at 6000 are the best bet. (You could also use 5600 as above if reliability is a big concern.) Examples include: OLOy CL32 1.35V ($93), TEAMGROUP CL30 1.35V ($100), Corsair CL30 1.4V ($100), G.Skill CL32 1.35V ($105), G.Skill CL30 1.35V ($109).

For 32 GB with Raptor Lake, Hynix-based kits at 6400 are a good default. Examples include: TEAMGROUP 1.35V ($110), G.Skill 1.4V ($110), OLOy 1.35V ($115), Corsair 1.4V ($120), PROXMEM 1.35V ($125).

With 32 GB on Raptor Lake, 6800 and 7200 are options if you want to go faster. These kits are more expensive and I don’t have a good sense of the chance of stability trouble at 7200. Examples include: TEAMGROUP 6800 1.4V ($125), G.Skill 6800 1.4V ($135), PROXMEM 6800 1.4V ($135), TEAMGROUP 7200 1.4V ($144), G.Skill 7200 1.4V ($150).

If you need a bit more capacity with Zen 4, Micron-based 2x24GB kits are good. Guaranteed-Hynix 2x24GB kits are both much more expensive and too fast to be plug-and-play with Zen 4. (Some of the kits that look Micron probably actually have Hynix dies in them, but there’s no way to be sure when buying.) Examples include: G.Skill 5600 1.25V ($140), G.Skill 6000 1.35V ($150), Corsair 5600 1.25V ($160).

If you need a bit more capacity with Raptor Lake, you could use the 2x24GB kits as for Zen 4, or you could go for dual-rank Hynix-based 2x32GB kits. Examples include: G.Skill 5600 ($190), Mushkin 5600 ($198).

For Zen 3, Klevv appears to be the most trustworthy cheap option. (The bins they use are relaxed and the dies should all be Hynix CJR or DJR, which are decent.) Examples include: 3600 2x8GB ($36), 3600 2x16GB ($60).

If Klevv isn’t an option, 3600 tCL 16 tRCD 19 (in either 2x8GB or 2x16GB) is a good default for Zen 3. All else equal I’d rather run these kits at 3533 than their rated 3600, but all the other options seem worse. Examples include: G.Skill 2x8GB ($49), Corsair 2x8GB ($55), G.Skill 2x16GB ($87), Corsair 2x16GB ($100).

If you want to overclock DDR4, this Patriot kit ($81) is nearly as good as it gets (it’s a very good Samsung B-die bin). The XMP profile is not all that useful on its own, so don’t buy this if you’re not sure you want to manually tune it. To get 32 GB in this case just buy two kits.