GreenAlgorithms / green-algorithms-tool

http://green-algorithms.org/
Creative Commons Attribution 4.0 International
84 stars 19 forks source link

Installed Memory; 0.3725W/GB? #14

Closed andhya closed 2 years ago

andhya commented 2 years ago

I've tried and failed to replicate the 0.3725W/GB used in the Green Algorithms model, so I'm wondering if you have any suggestions on where the difference may be?

I've tried running a machine with three configurations of DDR4 sticks installed;

and measured the power draw at the wall with the machine under three conditions;

The Green Algorithms model would suggest that the configuration with 6 sticks should have 24W more power draw than the configuration with 2 sticks. However, I only measured less than 1.5W increase in power draw;

Power Consumption v Installed RAM (4) (1)

The Green Algorithms model also suggests that the three load conditions should have minimal difference in power draw; solely from the CPU usage, but I measured an increase of 65W from base load to 24GB memory usage;

Power Consumption v Used RAM (1)

Looking at the source of your 0.3725W figure (https://www.tomshardware.com/uk/reviews/intel-core-i7-5960x-haswell-e-cpu,3918-13.html), do you have any information on the methodology used? Are they measuring the power at no load, at a fixed load across all setups, or at the full capacity of each setup?

Llannelongue commented 2 years ago

Hi @andhya, thanks for this and thank you for your patience!

Before diving in, what sort of hardware did you use for your experiments (laptop, desktop computer, server etc.)?

It is interesting that you get results that differ from the two benchmarks mentioned below, and we will keep an eye out for more similar results to see if this is perhaps indicative of a change of technology that we need to take into account for the model (we will periodically review the different parameters of the estimation anyway). Below are some more details about why we picked this value with some more references.

It’s difficult to know from here where the difference lies, but I’d be curious to know why the results are so different compared to Karyakin et al. in particular.


The power consumption of DRAM has been a difficult question since the start of the project, as there seem to be some discrepancies between measurements, depending on the circumstances. The current model is based on 2 main assumptions: Power draw depends mainly on capacity, not on workload or database size (provided the memory is not idle of course) A unitary power draw is 0.3725 W/GB

Regarding the first point, this is based on Karyakin et al.. They show that there is little variation in power draw when both transaction rate and database size vary (Figure 2, copied below).These results are in line with Desrochers et al. (who only test workload intensity, but don’t study database size). Karyakin et a.. explain this as follow:

"This is because memory is allocated across all DIMMs, even for small database sizes. A primary cause of this is memory interleaving, which controls the mapping of the server’s physical address space to the DIMMs. Interleaving results in a .ne-grained distribution of physical addresses across all of the DIMMs for a given socket. Hence, the memory load is spread across the DIMMs as well.” [Karyakin 2017]

image

There is indeed some variation, but considering the small magnitude of it and the fact that it is impractical to require scientists to measure workload intensity, we believe a unique value for memory power draw is a reasonable estimate.

Regarding the second point, the different benchmarks used by Desrochers et al. are particularly useful, especially “stream” and “HPL” (atlas, openblas, mkl) as they replicate some computations of scientific computing. “gcc-PAPI” can be of interest too although it represents less intense computes. The remaining benchmarks are not representative of what we are trying to measure: “sleep” is for idle mode, “openCL” is for integrated GPUs and “openGL ksp” is for video games. In table 6, and 7, and when looking at the benchmarks of interest (“stream” and “HPL”), the authors show relatively consistent power draws around 0.5W/GB. The numerical value per GB of memory used inthe Green Algorithms app (0.3725 W/GB) is similar although on the lower end of the spectrum. This can be explained by the fact that 0.3725 W/GB is based on DDR4 memory while Desrochers et al. used DDR3, and it has been estimated that DDR4 uses 30% less power (70% of 0.5W is 0.35W, very close to 0.3725).

andhya commented 2 years ago

This is great, thank you, I'll look to get hold of the text of those studies and see if there's anything that stands out as the major difference.

The hardware I was using was; Intel Xeon based and software-wise for this initial testing I was using Windows 10 Pro, running Ubuntu on WSL. I was monitoring RAM usage both in ubuntu and windows and there wasn't any clear discrepancy. I'll do some more rigorous testing with the same hardware using ubuntu server direct on the metal, and more reliable power logging over longer periods of time with a finer spread of loads.