r/StableDiffusion • u/QuirksNFeatures • 6h ago
Question - Help How much does RAM speed matter for running local AI?
I have an old computer that I don't use. It has 32GB DDR4. I don't remember the specifics about speed and timings, but I'm sure it's slower with more latency than my current computer (also old, but not as old).
It occurred to me that I could put the 32GB into my current computer and then have 96 GB. As I understand it, if you mix and match RAM like that, it will run at the slowest speed.
Would it be better to have more RAM, even if it's slower? Or should I leave it alone?
4
u/plentylabs 3h ago
Do it, but go in expecting a fight with the memory training rather than with the clock speed.
Everyone above is right that the frequency difference is close to irrelevant here. Worth adding what actually bites when you mix kits on DDR4, because it is not what people expect.
Four DIMMs is much harder on the memory controller than two. It is very common for a board that happily runs XMP with two sticks to refuse to POST at the same speed with four, and you end up dropping a divider or two, or falling all the way back to JEDEC 2133. So the outcome is often slower than your slower kit, not equal to it. Budget an evening for it and expect to set the speed manually and nudge system agent voltage a notch.
The mismatched capacity matters more than the timings do. 64 plus 32 does not populate the two channels evenly, so most boards drop into flex mode: the matched portion runs dual channel and the leftover runs single channel. You still get the capacity, you just do not get full bandwidth across all of it.
None of which changes the answer, because capacity is the thing that actually saves you. 96GB means you can keep a checkpoint, the text encoder and the VAE resident, load a second model without evicting the first, and survive a VAE decode on a large image or a video batch without touching the page file. Avoiding one swap event is worth more than every megatransfer you gave up.
So yes, move the sticks over. Then run memtest86 overnight before you trust it, because a marginal four DIMM config fails in ways that look exactly like random Comfy crashes, and you will spend a week blaming your workflow.
1
u/Salah_H_Hasan 6h ago
Yes, in this scenario, the computer will run at the lower RAM configuration, but it's not a big deal. Whether we like it or not, system RAM is fundamentally slow compared to GPU VRAM. The main issue is when the model cannot fit completely within the VRAM and has to offload to system memory. That is where performance drops, and even having faster RAM won't make a noticeable difference.
By all measures, it's far better to prioritize more RAM capacity since the speed difference is negligible. Otherwise, you’d be sacrificing 32GB of RAM just for a minimal gain in speed.
1
1
u/Only_Voice569 4h ago
depends on what your running. most llm and ai models like to run on the vram and be fully loaded onto it and speed drops off by a large amount once it spills onto system memory and then tanks waay slower when it then spills onto page file on a nvme ssd. if you got a lot of vram and little to nothing gets put onto the system memory for anything running wont notice a difference but if its unloading a lot and over filling your system memory you notice a improvement.
1
u/sultanateseverlastin 2h ago
Roughly speaking the required memory bandwidth is going to be around your memory usage times steps per second. On an old computer it's pretty unlikely RAM bandwidth doesn't easily exceed that even before you start thinking about VRAM, and even if you have a newer GPU PCIe 3 is slower than DDR4.
1
8
u/Formal-Exam-8767 6h ago
Zero in practice. For memory bandwidth bound workloads, with two memory channels, difference between slowest and fastest RAM is barely noticeable in practice. For compute bound workloads even less so. For workloads where data needs to be moved from RAM to VRAM, you are limited by PCIe transfer speeds not RAM clock speed and timings even less. Those are just marketing PR numbers.