RAM -> "read-modify-write" / data masking causing this issue :-) (intel z690 z790 asrock only)

Everything about latency. This section is mainly user/consumer discussion. (Peer-reviewed scientific discussion should go in Laboratory section). Tips, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
agendarsky
Posts: 86
Joined: 08 Jan 2021, 16:32

RAM -> "read-modify-write" / data masking causing this issue :-) (intel z690 z790 asrock only)

Post by agendarsky » 15 Aug 2025, 19:40

i achieved something i want to share. i mean its pretty huge , first of all im 14700k user and i disabled ram related setting named "data masking". now with cs2 performance iam at the same level as 7800x3d if not higher. i went from 450 average on 5v5 inferno to 560 peaking to 760 fps !!! its fucking insane how disabling this boosted my performance. well as we know , we all play high fps and still have that sluggish feel, tearing , click delay, uncontrollable bullet spread, slow movement but this is not the case this time :-) all of my videos , showings "something" is nothing compared to this. even if managed to achieve pretty good and stable input responsiveness , the desync overtime soon or later hits me again. but this time its very different and altrough if that dont fix desync for you (which i doubt this time) , the performance boost is one of best single settings u can find in bios , well atleast in z790. im using 48gb kit - 7200-36-44-44-116 with trefi boosted to 65k. so the thing is, since ddr2 there is a thing called data masking. it was introduced as an efficiency feature to save bandwidth and power when cpu only writes a part of cache line, instead of blasting the whole burst. with dm on, memory can skip writing unnecessary bits, which is very efficient for workloads with many small updates. the tradeoff is that it needs read-modify-write cycles in the background. the ram doing partial writes instead of full writes is the problem i think. in battlefield 6 i went from 160-190 to 210-280 fps, super smooth even at lower fps. also there are more options like lowering clock cycles to make ram do write bursts faster. i will post later. if i understand this correctly, normally when cpu writes only part of a cache line with data masking on, memory does a thing called rmw (read-modify-write). it first reads the whole block, changes the bits, then writes it back. this adds random delay and makes timing inconsistent. that means the pc, after it receives data into ram, modifies them while reading and writes them again at the same time as new data are coming in. the opposite of this is full write mode, which is just one way flow. when you disable data masking, rmw is not used. every write is always a full burst. yeah it wastes some bandwidth, but the pipeline is cleaner and the game feels way more stable, no sluggish slowdown. also this fits my timeline with the problem. unlike most of you, for me it didn’t appear suddenly like one day it was great and next day it was bad. it started when i changed parts and went from ddr400 to ddr2. there was no partial writing on ddr400, only full bursts!!

Setup Question = DM Enable
Help String = Configure the DM Enable for DRAM MRS MR5 OP[5].
Token =792 // Do NOT change this line
Offset =695
Width =01
BIOS Default =[FF]Auto
Options =[FF]Auto // Move "*" to the desired Option
*[00]Disabled
[01]Enabled
fullscreen pics: https://screenshot.cz/AJ/AJB2S/20250815232040_1.jpg , https://screenshot.cz/PJ/PJGST/20250815232331_1.jpg
fps (demo afected) before this setting applied https://www.youtube.com/watch?v=S0g1uY8CAx0
Image
Image
Last edited by agendarsky on 16 Aug 2025, 20:25, edited 3 times in total.

MeveSPB
Posts: 31
Joined: 07 Feb 2024, 03:32

Re: RAM -> "read-modify-write" / data masking causing this issue :-)

Post by MeveSPB » 16 Aug 2025, 03:18

Where do you change these settings? There are no similar bios settings on my MSI Z790 Carbon WiFi board.
We need to understand how to do this. Can I have a screenshot? Is it SCEWIN?

/ In my case, there is no specific setting in Scewin called "Setup Question = DM Enable".
There is something similar called "DM Value". Is that what you're talking about?
I wonder what value it needs to be changed to?

Code: Select all

// Script File Name : nvram.txt

Setup Question	=   DM Value
Help String	= DM Value
Token	=AC9	// Do NOT change this line
Offset	=B5
Width	=01
BIOS Default	=<15> 
Value	=<15>
// I need to set the value to [00], which means "Disable DM Value"? I need to figure out how to change this using SCEWIN, as I'm not a very experienced user :? . Has anyone tested this yet?
Last edited by MeveSPB on 16 Aug 2025, 08:17, edited 2 times in total.

ablemor
Posts: 224
Joined: 21 Oct 2022, 07:05

Re: RAM -> "read-modify-write" / data masking causing this issue :-)

Post by ablemor » 16 Aug 2025, 07:53

But you said that the USB controller setting fixes the floaty mouse issue, so does it not after all? Also, can you suggest a setting for AM5 as well?

petergase
Posts: 17
Joined: 25 Jul 2021, 09:37

Re: RAM -> "read-modify-write" / data masking causing this issue :-)

Post by petergase » 16 Aug 2025, 10:50

i dont have that setting in scewin, 12700k ddr4 4000mhz bdie

petergase
Posts: 17
Joined: 25 Jul 2021, 09:37

Re: RAM -> "read-modify-write" / data masking causing this issue :-)

Post by petergase » 16 Aug 2025, 13:51

MeveSPB wrote:
16 Aug 2025, 03:18
Where do you change these settings? There are no similar bios settings on my MSI Z790 Carbon WiFi board.
We need to understand how to do this. Can I have a screenshot? Is it SCEWIN?

/ In my case, there is no specific setting in Scewin called "Setup Question = DM Enable".
There is something similar called "DM Value". Is that what you're talking about?
I wonder what value it needs to be changed to?

Code: Select all

// Script File Name : nvram.txt

Setup Question	=   DM Value
Help String	= DM Value
Token	=AC9	// Do NOT change this line
Offset	=B5
Width	=01
BIOS Default	=<15> 
Value	=<15>
// I need to set the value to [00], which means "Disable DM Value"? I need to figure out how to change this using SCEWIN, as I'm not a very experienced user :? . Has anyone tested this yet?
i tested 0, but i play way worse after that maybe because of rawaccel, couldnt check for fps boost

agendarsky
Posts: 86
Joined: 08 Jan 2021, 16:32

Re: RAM -> "read-modify-write" / data masking causing this issue :-)

Post by agendarsky » 16 Aug 2025, 19:39

ablemor wrote:
16 Aug 2025, 07:53
But you said that the USB controller setting fixes the floaty mouse issue, so does it not after all? Also, can you suggest a setting for AM5 as well?
send my nvram.txt into pm but i've been looking through uefi editor about this and amd bioses especially am5 are very blank and not exposing mrs commands. mrs = mode register set. basically every dram chip has a bunch of small control registers (mr0, mr1, mr2 … up to mr40+ on ddr5) that tell it how to behave. when you boot the pc the memory controller sends mrs commands to the sticks to set stuff like cas latency, burst length, write recovery, preambles, odt offsets, all that timing junk. each mr has different bits (op[x]) that flip features on or off.
for example mr0 is basic timings like cas and burst length. mr1 has dll enable and drive strength. mr2 has write latency stuff. mr5 is where data mask and tdqs live. mr6 has write recovery and trtp. mr8 has preamble/postamble. on ddr5 you even have mr37–mr40 for odt and dqs offsets.
so yeah, when you change something in bios like “data masking” or “write recovery time” what actually happens is the imc just fires an mrs command to dram with the right bits set. that’s the real switch. But i can look.
ablemor: yea , im still using that and i will use that in future pc's if possible, but at this point im not updating until i see avaiable settings to change in bios and amd hates exposing things like that, its locked in agesa firmware probably. For your question i think the possitive effect was result by usb controller doing less batching and buffering, from my experience it was huge improvement especially on am4 with 5800x3d and thanks to x3d cache more partial writes states in cache using less ram work to do. but thats just my theory i've made right now.
At this time looking for that settings in gigabyte z790 aorus ax-w and cant find it there, im lucky with my asrock z790 nova. This is proof for me that this is motherboard related and some settings are just hardwired in imc.
edit 1- It seems like this option is exposed only on Asrock boards, tested z790 taichi , z790 ps, z790 pro lighting and its there for all of them but cant find it on any other different brand :( , looked through several z690 boards and its there, looks like its asrock specific and if its present on different motherboard brands , mb under different name but chances are low atm.

agendarsky
Posts: 86
Joined: 08 Jan 2021, 16:32

Re: RAM -> "read-modify-write" / data masking causing this issue :-) (intel z690 z790 asrock only)

Post by agendarsky » 17 Aug 2025, 02:57

In addition u can try lowering this settings
Write Recovery Time (mine 48nCK)
Read to Precharge Delay (tRTP) (mine is 20 nCK)
Read Preamble (mine is 1tCK)
Write Preamble / Read Postmable (mine is 0.5 tCK) / keep theese as much low u can without compromising stability , u can use aida64 memory test after each setting is edited. Use Y-cruncher components stress tester after you got all set up.

Read DQS Offset , ODTLoff RD NT Offset, ODTLon RD NT Offset, ODTLoff WR NT Offset, ODTLon WR NT Offset, ODTLoff WR Offset, ODTLon WR Offset - 0 clocks. I suggest you to edit and import one by one, import - restart - import -restart.

Brutek_Vladimir
Posts: 21
Joined: 06 Sep 2018, 11:38

Re: RAM -> "read-modify-write" / data masking causing this issue :-) (intel z690 z790 asrock only)

Post by Brutek_Vladimir » 17 Aug 2025, 06:26

I thought Asrock newer bioses got locked and users are unable to change settings with SCEWIN.
Im 100% locked now with am5 Asrock B650 hdv something.
Last year or so it was possible to use SCEWIN with it.
Do you use latest bios with these 790 boards?

Edit: And if its Asrock speciality, It could be other board vendors use DM off as default. It would be crazy to rewrite all cpu reviews for Raptor Lake.

ablemor
Posts: 224
Joined: 21 Oct 2022, 07:05

Re: RAM -> "read-modify-write" / data masking causing this issue :-) (intel z690 z790 asrock only)

Post by ablemor » 17 Aug 2025, 10:05

The ASRock motherboard is indeed protected, but it can be modded, and even fields can be made visible in the BIOS. I know how to do it, so if you’d like, send me your BIOS and I’ll help you. In the meantime, I’ve switched motherboards I sold the flagship ASRock and bought a Gigabyte board instead.

agendarsky
Posts: 86
Joined: 08 Jan 2021, 16:32

Re: RAM -> "read-modify-write" / data masking causing this issue :-) (intel z690 z790 asrock only)

Post by agendarsky » 17 Aug 2025, 11:19

lol yeah , its crazy i think also boosting trefi had some impact , i already want to sold Asrock Z790 nova for gigabyte just for the sake the turbo cant be enabled without speedshift turned on. Im glad i stayed and took a look at ram stuff. btw its board without flashback support and it exposes everything in scewin usb controller mode including.

Post Reply