SilverAzide / Gadgets

Gadgets for Rainmeter
Other
348 stars 11 forks source link

Strange system memory behavior in dual CPU system #108

Closed candre23 closed 1 week ago

candre23 commented 1 month ago

Found some more weirdness which may or may not be down to how windows reports things.

I have a dual CPU system with a total of 64GB RAM - 32GB per CPU. Rainmeter reports this normally, "filling up" CPU0 first. However, once the RAM for CPU0 is maxed out and it starts filling up CPU1's RAM, the numbers for CPU0 zero out like this.

image

Then when it starts to back down, it will report RAM for both CPUs again, though if it's hovering around the full 64GB mark, both CPUs will occasionally zero out.

image

I don't know how windows actually handles the reporting of memory usage in a dual CPU system like this. My suspicion is that it's reporting slightly over 32GB per-CPU at times, and that's throwing rainmeter for a loop and causing it to display zeros. If this is the case, could rainmeter perhaps assume that if the number is >100%, just display 100% instead of 0%?

SilverAzide commented 1 month ago

Thank you for the feedback!

I actually just made a ton of changes to the way memory is shown while I was fixing the other problem you reported. There is a new feature that was added to the CPU Meter to show the memory composition (used, free, standby, etc.) and I needed to make extensive changes to handle machines running in NUMA mode like yours. I stopped using the "old" Rainmeter way and added code to read the NUMA RAM data from the Performance Counters database.

Would you be willing to test a patch for me? A Rainmeter patch will overwrite just a portion of your installation without affecting the rest. So it will overwrite your CPU Meter(s) with a newer version, but should leave the rest of the skins intact.

candre23 commented 1 month ago

Sure, I'll test it out. Just let me know what I need to do.

SilverAzide commented 1 month ago

Hi @candre23, sorry for the delay in responding.

Please copy the attached .zip file to some location and change the file extension from .zip to .rmskin. This is really an .rmskin skin installer file. It is a "patch" installer, so it is going to simply overwrite the All CPU Meter skin files with newer versions. You will lose your custom CPU Meter settings (if any), but they should easy enough to reset. The rest of the skins in the suite will not be touched.

To minimize any possible issues I'd suggest the following:

Each CPU Meter should show the memory allocated to each NUMA node separately. It should not show that strange behavior where one skin shows the RAM while the other other skin showed 0 bytes.

If you open the Settings, there is a new option under the RAM entry that reads Show Memory Composition. IF you enable this, you will see the RAM bar now shows an additional shaded section which is the amount of RAM in standby mode (stuff that is cached, but can be freed when needed).

image

I'm very interested to know how it goes!

All CPU Meter - Gadgets Patch_7.7.0.zip

candre23 commented 1 month ago

It seems to have mostly worked. The first upgrade attempt didn't seem to change anything, but I rebooted the machine, completely shut down rainmeter, ran it again, and that seems to have gotten it to take. I'm seeing the shadow/cached RAM usage now, and I don't see it zeroing out the usage when one side fills up, so that's great.

image

I have enabled "show memory composition" in the settings, but I'm not getting that composition window popping up on mouseover. That's the only part that isn't working as intended for me.

SilverAzide commented 1 month ago

Oops! My bad! Looks like I goofed up the logic that shows the memory composition tooltip. I'll fix that.

SilverAzide commented 1 month ago

@candre23, Unzip the attached file and copy over the existing CpuMain.inc file in your Rainmeter\Skins\Gadgets\All CPU Meter folder with this new version. Then refresh your two CPU Meters (no need to restart Rainmeter, reboot, or etc.). This should correct the tooltip problem.

CpuMain.zip

candre23 commented 1 month ago

That seems to have done the trick. Thanks!

SilverAzide commented 1 week ago

Corrected in next release. Thanks!