Life In 19x19
http://lifein19x19.com/

RAM Latency
http://lifein19x19.com/viewtopic.php?f=18&t=19147
Page 1 of 1

Author:  RobertJasiek [ Sat May 06, 2023 12:28 am ]
Post subject:  RAM Latency

For a desktop with Ryzen 7700 and B650 Tomahawk and RTX 4070 to build, I can choose RAM

- DDR5-5600 CL28-34-34-89 with at most 2 DIMM (64GB)

- DDR5-4800 CL38-38-38 with up to 4 DIMM (now 64GB, later optionally 128GB)

The slower RAM has the option of 4 DIMMs.

I think the speed 5600 or 4800 is immaterial, right?

The latency might be more relevant, but is it? Does it make a significant difference for KataGo to use CL28-34-34 or CL38-38-38?

Author:  And [ Sat May 06, 2023 2:19 am ]
Post subject:  Re: RAM Latency

I would run the test on the existing hardware, then change the timings and run the test again

Author:  RobertJasiek [ Sat May 06, 2023 2:43 am ]
Post subject:  Re: RAM Latency

Someone might. I can't because first I need to buy the computer:) When doing so, I want to get the more appropriate RAM.

Author:  And [ Sat May 06, 2023 2:48 am ]
Post subject:  Re: RAM Latency

if you are interested, I can test on different frequencies, write an approximate configuration of the katago version, network

Author:  And [ Sat May 06, 2023 2:56 am ]
Post subject:  Re: RAM Latency

you will most likely run a non-CPU version, in my opinion the difference will be very insignificant

Author:  Cassandra [ Sat May 06, 2023 5:13 am ]
Post subject:  Re: RAM Latency

For my Igo Hatsuyôron 120 @ KataGo 60b training project, selfplay is running on Ryzen 5950 / RTX 3090, using about "only" 18 GByte of SYSTEM memory.
Therefore, I do not assume that SYSTEM memory is any limiting factor, especially not for your likely purposes of analysis.

Author:  RobertJasiek [ Sat May 06, 2023 5:34 am ]
Post subject:  Re: RAM Latency

As has been reported, ca. 6h of calculating ca. 20 million playouts by two 2080TI can fill ca. 64GB of RAM. As I might also want to study complex global ko fights, many playouts can be useful.

Frequencies are less interesting so please do not spend more than a few minutes on them. I have been hoping for somebody to have done RAM tests before or collected experience with different RAM parameters.

I am more interested in RAM latencies. So a bit of more study time for them would be welcome.

Yes, I would run on the GPU rather than nothing but the CPU. That is what graphics cards are for, after all:)

Author:  Cassandra [ Sun May 07, 2023 9:45 am ]
Post subject:  Re: RAM Latency

What do you expect from 20 million playouts?

Author:  RobertJasiek [ Sun May 07, 2023 12:35 pm ]
Post subject:  Re: RAM Latency

Greater confidence than from 20 thousand.

Author:  Cassandra [ Sun May 07, 2023 2:56 pm ]
Post subject:  Re: RAM Latency

RobertJasiek wrote:
Greater confidence than from 20 thousand.

If your net is familiar with the position under examination, 20 thousand playouts are more than enough.
If it is not, even 20 billion playouts will not really help.

The more unrealistic the position (in the sense of "never seen in training so far"), the more likely it is that you will have to train your net accordingly.

Author:  And [ Mon May 08, 2023 2:36 am ]
Post subject:  Re: RAM Latency

I started katago_tensorRT (gf 1650 gtx, 18b, 60 sec) 3 times (DDR4 2400 17 17 17 39): 19098, 15387, 16296 visits
and 3 times (DDR4 2133 15 15 15 35): 19735, 21400, 17456 visits
I started it in sabaki, connected the engine again every time and katago made the first move

Author:  And [ Mon May 08, 2023 2:59 am ]
Post subject:  Re: RAM Latency

https://ram.userbenchmark.com/Software

Author:  RobertJasiek [ Mon May 08, 2023 3:38 am ]
Post subject:  Re: RAM Latency

Code:
(DDR4 2400 17 17 17 39): average, 19098, 15387, 16296 visits
---------- 100% -------- 100%     100%   100%   100%
(DDR4 2133 15 15 15 35): average, 19735, 21400, 17456 visits
-----------113.3% ------ 116.5%   103.3% 139.1% 107.1%


Supposing only the RAM parameters differed and software details were immaterial, we get the following: The relative speed of the first RAM latency value is almost the average improved percentage of numbers of visits. The RAM frequency seems to be immaterial, or is dominated by the minor latencies. Of course the test sample is small. If, however, we trust it, the conclusion seems to be that RAM latency is a decisive factor!

Author:  kvasir [ Mon May 08, 2023 7:48 am ]
Post subject:  Re: RAM Latency

I suspect you are drawing incorrect conclusions.

Maybe one device is faster but CL of 15 or CL of 17 is the CAS latency in clock cycles, which needs to be divided by the bus speed in hertz to get the cache latency in seconds (usually reported in nano seconds). When a CL 15 device runs on a bus speed of 1066.67 MHz and a CL 17 device runs on 1200 Mhz (which is supposed to be the standard specification) then the CAS latency is 14.063 ns and 14.16 ns respectively. A difference of 0.69%.

The experiment compares a device with a lower data rate and a higher latency with a device with a higher data rate and a lower latency, or that would appear to be the case. I don't know if it's the case or not, but possibly the DDR4 2133 was actually running at the same bus speed as the DDR4 2400. Usually RAM and mother boards have documentation for recommended settings, that would mean the DDR4 2133 15-15-15-35 was basically a DDR4 2400 15-15-15-35 and the CAS latency would be 12.5 ns. These RAM devices use an external clock and usually there are more than one recommended setting.

I'd expect (maybe as a first hypothesis) that comparison of the wall time for a fully memory bound computation that doesn't take advantage of prefetching (or can't benefit) to have a close correspondence to the difference in clock latency measured in nano seconds. If the computation takes advantage of prefetching (from memory into CPU cache) I'd expect a correspondence to the difference in memory transfer rate. One possibility is that the behavior is more indicative of the program used to control KataGo, I think I remember that Sabaki is a Python program and I usually use Katrain, another Python program, and observe that it occasionally uses a lot of memory and CPU and GPU resources (that is the Graphical Processing Unit not the Go Processing Unit).

The DDR5 devices quoted (far) above are different in that one has both a higher data rate and a lower latency than the other, it's should be better all around. The only issue is the possibility the cost of upgrading memory later.

By the way the official AMD website states that the CPU (same CPU or?) supports 4 DIMMs for DDR5-3600 or less and 2 DIMMs for DDR5-5200 or less. With this information I'd assume that the 4x DDR5-4200 or 2x DDR5-5600 would operate as DDR5-3600 or DDR5-5200, since the memory controller is, I believe, built into the AMD CPUs. Then again AMD does somewhat encourage overclocking, it's supposed to void the warranty though.

===Edit for some reason I wrote cache latency but it's called call CAS latency (column address strobe latency).

Author:  RobertJasiek [ Mon May 08, 2023 11:07 am ]
Post subject:  Re: RAM Latency

Are you effectively trying to say that we do not have enough information to judge whether the RAM with higher frequency or the RAM with lower latency is better for us?

Author:  kvasir [ Mon May 08, 2023 12:36 pm ]
Post subject:  Re: RAM Latency

RobertJasiek wrote:
Are you effectively trying to say that we do not have enough information to judge whether the RAM with higher frequency or the RAM with lower latency is better for us?


The DDR5-5600 that you cited is faster in every regard.

* DDR5-5600 CL28-34-34-89

Maximum transfer speed: 44.8 GiB (5600 M/T * 8 B/t)
Bus speed: 2800 MHz (5600 M/T * 1 / (2 T))
CAS latency: 10 ns (28 / 2800 MHz)

* DDR5-4800 CL38-38-38

Maximum transfer speed: 38.4 MiB
Bus speed: 2400 MHz
CAS latency: 15.8 ns

If the only question is which memory device serves data faster, then it is the DDR5-5600. It both transfers more per second and starts transferring quicker. In that sense it's enough information.

If this is a question on the measurements by And using different DDR4 memories then there might not be enough information to interpret it. At least drawing the conclusion that the difference was due to CAS latency doesn't seem right.

Author:  RobertJasiek [ Mon May 08, 2023 2:42 pm ]
Post subject:  Re: RAM Latency

Further considerations:
- Does the RAM cooler fit under the CPU cooler?
- Does the mainboard or RAM manifacturer confirm compatibility for a model set of a particular GB size and number of occupied DIMMs?
- Is it RGB or not and which does one prefer?
- Is the price difference too large?
As it turns out after closer inspection, I may have to bow to such soft criteria. (I do not choose other mainboard and CPU cooler just to get the perfect RAM modules.)

Author:  RobertJasiek [ Tue May 09, 2023 1:56 am ]
Post subject:  Re: RAM Latency

https://timdettmers.com/2018/12/16/deep ... Clock_Rate

Tim Dettmers writes that fast versus slow RAM makes 0 ~ 3% speed difference for machine learning. I conclude that spending €30 on much faster RAM might be worth it (ca. 1.5% of a €2000+ desktop price) but not €50. More important may be RAM stability and longevity.

Author:  And [ Thu May 11, 2023 8:52 am ]
Post subject:  Re: RAM Latency

I changed the processor to Ryzen 5 (there was an athlon x4), the memory is the same, (DDR4 2667 20 19 19 43): 10739, 11473, 11164 visits.
started tuning katago again, after: 10964

Author:  RobertJasiek [ Thu May 11, 2023 10:16 am ]
Post subject:  Re: RAM Latency

As it has turned out, the alleged 4 DIMM option was a mistake on the mainboard reference page. After more careful inspection, I have also noticed that the smallest CL stick is incompatible to my chosen board. The cheapest module has not been readily available. So I am settling for some reasonable compromise for a typical market price after all;) It remains the most important that RAM sticks do work at all together with the chosen CPU and mainboard! Nevertheless, the discussion has been interesting and might help others.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/