./ahmedhashim

Overclocking RAM

I finally went ahead and updated the UEFI on my PC. It’s an X570 board with a Ryzen 7 5800X that I put together years ago and mostly forgot about. Updating the UEFI resets all of your settings, so you want to write down any changes you’ve made first. I didn’t have many, just my boot order.

Here’s what I found while going through the firmware. I looked at what the memory was running at:

$ sudo dmidecode -t memory | grep -E 'Part Number|Configured Memory Speed'
	Part Number: F4-3600C16-16GTZNC
	Configured Memory Speed: 2133 MT/s

All of them are reporting the same info. That’s the G.Skill part number for their 3600 CL16 memory, and the configured speed is what it’s actually training at. These sticks were built to run at 3600 MT/s but have been running at 2133 since they were made.

Defaults

Boards typically have you running the JEDEC profile, which all DDR4 is rated for. The speed on the box is another profile that’s also stored on the stick. Intel refers to it as XMP. ASUS on AMD refers to it as DOCP. It runs at 1.35 V instead of the 1.2 V that JEDEC calls for, so it’s not enabled by default.

Anything above JEDEC rated speeds is considered overclocking. Firmware won’t overclock your memory for you, you have to tell it to. G.Skill already tested these sticks at that profile before selling them, so the risky part’s already done.

Infinity Fabric

Memory clock also drives the Infinity Fabric on Zen 3. This is what’s used to communicate between all cores and memory. It runs at a 1:1 ratio until about 1800 MHz. 2133 to 3600 will increase your memory bandwidth by 69% and speed up your IF as well.

One setting

Flashed the BIOS, went into the tweaker menu, changed Ai Overclock Tuner to D.O.C.P., selected the 3600 profile and rebooted. Had to wait a bit for it to train on the 1st boot, but it posted:

$ sudo dmidecode -t memory | grep -m1 'Configured Memory Speed'
	Configured Memory Speed: 3600 MT/s

Just had to test it.

Memtest

Running 4x dual rank sticks at 3600 is about the most you can ask of an AM4 memory controller. Having bad RAM can lead to corruption or crashing that can be annoying to troubleshoot. So make sure to memtest your system overnight.

When using Arch with systemd-boot you’ll need to use the EFI one:

sudo pacman -S memtest86+-efi

And make sure you have a loader entry:

# /boot/loader/entries/memtest86+.conf
title   Memtest86+
efi     /memtest86+/memtest.efi

I got tripped up by this because systemd-boot lists its entries newest first. My loader.conf had arch as the default, but the entry was named arch.conf. It never matched, so once I added memtest, that became my default. So make sure to have default arch.conf before you reboot.

I have my boot menu set to be hidden, so a one-shot is the best way to run it:

sudo bootctl set-oneshot memtest86+.conf
systemctl reboot

It’ll only boot into memtest once and then return to the normal boot process. If it reboots for any reason, it won’t boot into memtest again. I let it run overnight and it had completed 3 passes by the time I woke up. So the sticks were fine.

Greatest upgrade to this computer in years, and free as well. It was just sitting there in a menu for me to find. If you’ve never checked yours, dmidecode will only take you a couple seconds.