Doubling Memory

A while back, I was looking for ways to improve my server for running large language models locally with Ollama and llama.cpp. One recommendation was to expand my motherboard to its full capacity. I was using only two of four slots at 16 GiB each, and the motherboard could support up to 64 GiB. Each pair of slots shares a single memory channel, so the memory was already configured to make use of the most physical bandwidth available. Purchasing additional memory would only be for capacity rather than speed.

However, another trick to speed up my memory was to use an eXtended Memory Profile (XMP), which I hadn’t been using. The memory and motherboard were set to the standard 2133 MT/s, but were compatible with 3200 MT/s with XMP. The speed increase is significant: a 50% jump from 34.1 GB/s to 51.2 GB/s.

BeforeAfter
Physical RAM32 GB64 GB
DIMMs2 Ă— 16 GB4 Ă— 16 GB
DIMM rankDual-rankDual-rank
Memory speed2133 MT/s3200 MT/s
ChannelsDual-channelDual-channel
Swap8 GB8 GB

Normally, system RAM doesn’t help models, since models often run on the GPU, which has VRAM and much higher memory bandwidth. My 3080 Ti can move memory at 912 GB/s – 17.8 times the speed of the upgraded system RAM. However, some of the tricks I’ve been using, and my desire to work with larger models that don’t fit in my GPU VRAM, have made the increased capacity and speed of system RAM more necessary.

Currently, memory prices are through the roof. Even though this is ten years old, it was still affected by the global memory shortage, as many data centers have high demand for memory, driving consumers to pay extra for any compatible memory they can find and to hold off on upgrading computers. I didn’t want to make a mistake, so for maximum compatibility, I traced my memory’s product number to F4-3200C16D-32GVK. It was G.SKILL Ripjaws V Series DDR4 3200 32 GB (2 x 16 GB).

Overview

ChatGPT told me that I needed to find the same brand/type of memory for the best results. The features on the product listing pretty much convinced me not to bother looking at any other type of memory if I wanted faster speeds.

Features

It was listed on Newegg at $239.99, but I got a $30 discount. With tax and free shipping, that came out to $221.12. I purchased the same kit on June 27, 2017, for $254.99. I guess the price actually went down, but for something almost a decade old, when DDR5 memory is the mainstream at twice the speed and DDR6 is on the horizon, it’s a bit astonishing.

I had a few problems installing it. At first, I got a C1 code on the motherboard along with some beeping, which tends to be associated with memory initialization/compatability failure. I made sure everything was seated properly, but couldn’t find any problems. I removed the new sticks, and the machine booted. Maybe the problem was the new memory itself, so I then swapped the old with the new, and the machine still booted.

IdeaActionEffect
Not seated properlyRemove and put back into place.Error
Bad slotsRemove new sticks, put old sticks in empty slotsWorks
Maybe new memory bad or wrong speedSwap old sticks with newWorks. Old memory at 2133 MT/s
Not seated properlyPut new sticks in empty slotsWorks?

So the original issue appeared to be that the memory wasn’t seated properly.

Before enabling the XMP profile, I booted the machine into Ubuntu and confirmed it recognized both the available free memory and that the slots were filled.

free -h
sudo dmidecode --type memory

Once I saw what I needed, I went back to bios and enabled the XMP profile. Once the system restarted, nothing happened. No beeping, and nothing on the monitor. I noticed the LED code on the motherboard said something ending with a 9… the first letter I don’t recall, but from what ChatGPT told me, it meant that we got past the memory test and had something to do with the PCIe not recognized, and to wait awhile before rebooting. I was already waiting, so I rebooted, and everything came up. I went into Ubuntu and confirmed that it still saw the memory, and now saw the new memory speed.

free -h
sudo dmidecode --type memory
# total used free shared buff/cache available
# Mem: 60Gi 6.8Gi 45Gi 68Mi 9.0Gi 53Gi
# Swap: 8.0Gi 0B 8.0Gi
# simplified
sudo dmidecode --type memory | grep -E \
'Locator:|Speed:|Configured Memory Speed:|Configured Voltage:'
# Locator: ChannelA-DIMM0
# Bank Locator: BANK 0
# Speed: 3200 MT/s
# Configured Memory Speed: 3200 MT/s
# Configured Voltage: 1.2 V
# Locator: ChannelA-DIMM1
# Bank Locator: BANK 1
# Speed: 3200 MT/s
# Configured Memory Speed: 3200 MT/s
# Configured Voltage: 1.2 V
# Locator: ChannelB-DIMM0
# Bank Locator: BANK 2
# Speed: 3200 MT/s
# Configured Memory Speed: 3200 MT/s
# Configured Voltage: 1.2 V
# Locator: ChannelB-DIMM1
# Bank Locator: BANK 3
# Speed: 3200 MT/s
# Configured Memory Speed: 3200 MT/s
# Configured Voltage: 1.2 V

Now it was time to verify. Mind you, the following is going to take about 1 hour for each run, and I set up 2 runs.

sudo apt install memtester
sudo memtester 50G 2

Yep… after an hour, I decided to call it quits on the memory test. It’s already held up quite a bit.

Does it speed anything up? I don’t know. I’m not really testing any models tonight. laguna-xs-2.1:q4_K_M (20 GB) and qwen3-coder:30b (18 GB) are my heavyweight models, and they don’t fit in the 3080 Ti’s 12 GB of VRAM. I’m not testing them tonight.

Leave a Reply

Discover more from Lewis Moten

Subscribe now to keep reading and get access to the full archive.

Continue reading