It is currently September 14th, 2024, 10:14 pm

Gadgets 7.8.0 - inspired by AddGadgets.com Sidebar Gadgets

A package of skins with a "theme" or by a single author
User avatar
SilverAzide
Rainmeter Sage
Posts: 2736
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

prophet4NO1 wrote: May 26th, 2024, 8:30 pm Hey, really like this skin. Been using it since Modern Gadgets was retired.

I just have one question/request. Is it possible to add cached memory usage to the CPU meter? In task manager, you can see how much memory is used as cache, but is not active. It would be nice to see that in the CPU Meter gadget as well. If possible, stack it in the same bar as ram usage. Maybe a green bar extending from the blue memory bar or a separate bar like the page file. Not sure if this is actually doable or not. But, would be cool.
Cached memory? I'm not sure if I would use the word "cool" to describe it, LOL. "Interesting", maybe... You'd need to tell me exactly where this number is coming from, as I don't see it in Perfmon directly.

In any case, the CPU Meter is already very complex, so I really don't see me adding this unless it provided some sort of useful insight. It seems to just be some subset of the "free" amount, which seems to be an adequate measure in itself.
Gadgets Wiki GitHub More Gadgets...
prophet4NO1
Posts: 20
Joined: January 1st, 2019, 10:41 pm

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by prophet4NO1 »

Windows (and linux for that matter) use the not actively used part of physical system memory as a cache. Basically any recent/frequently used data ends up there for quick access later. Faster than pulling from the HDD/SSD.

This image is from my current Task Manager window on the memory page. Currently, 8.1GB being used. Of the 23.7GB of "free" memory, it actually has 23.5GB of cached data in it. Shown both in text form and graphicly in the bar above. Left slightly darker bit is actively used memory. The next chunk using most of the rest of the bar is used as cache. The little sliver all the way to the right is actually free unused memory.

Image

On a fresh boot, the cache is pretty much zero. But will grow as the system is used. Eventually filling most of your memory. Sometimes big chunks will get freed up.

As for usefulness, I have noticed from time to time, memory speed sensitive tasks or benchmarks will see a performance drop when the memory has filled. My assumption at this point is the system needing to spend a few cycles clearing cached data from memory to make room for allocation for active threads to store working data.
User avatar
Yincognito
Rainmeter Sage
Posts: 8127
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by Yincognito »

SilverAzide wrote: May 27th, 2024, 1:16 amYou'd need to tell me exactly where this number is coming from, as I don't see it in Perfmon directly.
prophet4NO1 wrote: May 27th, 2024, 2:47 amThis image is from my current Task Manager window on the memory page. Currently, 8.1GB being used. Of the 23.7GB of "free" memory, it actually has 23.5GB of cached data in it. Shown both in text form and graphicly in the bar above. Left slightly darker bit is actively used memory. The next chunk using most of the rest of the bar is used as cache. The little sliver all the way to the right is actually free unused memory.
Some potentially helpful info:
- https://superuser.com/questions/1410289/what-are-commited-memory-cached-paged-not-paged-pool-how-they-are-d
- https://superuser.com/questions/1284330/under-memory-performance-tab-in-task-manager-what-does-the-cache-value-means
- https://learn.microsoft.com/en-us/windows/win32/memory/memory-performance-information
The last link also explains how to compute the said value, albeit from the looks of it, it seems there is a typo there when it comes to the last member of the sum from the last row in the first table. I somewhat accounted for that by using two alternative Formulas in the following skin sample, which does the same (seen at the bottom of the Resource Monitor window) - you can scroll to change the measurement unit:

Code: Select all

[Variables]
ScaleCount=4
ScaleIndex=0
ScaleLabel0= B
ScaleLabel1=kB
ScaleLabel2=MB
ScaleLabel3=GB

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[CacheBytes]
Measure=Plugin
Plugin=UsageMonitor
Category=Memory
Counter=Cache Bytes

[ModifiedPageListBytes]
Measure=Plugin
Plugin=UsageMonitor
Category=Memory
Counter=Modified Page List Bytes

[StandbyCacheReserveBytes]
Measure=Plugin
Plugin=UsageMonitor
Category=Memory
Counter=Standby Cache Reserve Bytes

[StandbyCacheNormalPriorityBytes]
Measure=Plugin
Plugin=UsageMonitor
Category=Memory
Counter=Standby Cache Normal Priority Bytes

[StandbyCacheCoreBytes]
Measure=Plugin
Plugin=UsageMonitor
Category=Memory
Counter=Standby Cache Core Bytes

[SystemCodeTotalBytes]
Measure=Plugin
Plugin=UsageMonitor
Category=Memory
Counter=System Code Total Bytes

[PhysicalMemoryCached]
Measure=Calc
;Formula=(CacheBytes+ModifiedPageListBytes+StandbyCacheReserveBytes+StandbyCacheNormalPriorityBytes+StandbyCacheCoreBytes)
Formula=(CacheBytes+ModifiedPageListBytes+StandbyCacheReserveBytes+StandbyCacheNormalPriorityBytes+SystemCodeTotalBytes)

---Meters---

[Result]
Meter=String
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
MeasureName=PhysicalMemoryCached
Scale=(1024**#ScaleIndex#)
NumOfDecimals=2
Text=Physical Memory Cached: %1 [#ScaleLabel[#ScaleIndex]]
MouseScrollUpAction=[!SetVariable ScaleIndex ((#ScaleCount#+#ScaleIndex#-1)%#ScaleCount#)][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseScrollDownAction=[!SetVariable ScaleIndex ((#ScaleCount#+#ScaleIndex#+1)%#ScaleCount#)][!UpdateMeter #CURRENTSECTION#][!Redraw]
DynamicVariables=1
Cached Memory.jpg
The 1st Formula is more similar to the Microsoft's sum above but gives slightly higher values, while the 2nd is less similar to that sum but gives closer values for me, which is why I commented out the 1st. Feel free to explore and find out which is correct or if there's an even more precise way to compute that value. ;-)

P.S. It's possible that the difference between what these byte sums are reporting and what Task Manager or Resource Monitor (Modified+Standby) are is due to the latter two adding up the rounded MB / GB values for every individual member of the sum, instead of converting the entire sum value to MB / GB like the former is doing - it will be up to you to see if this is indeed the reason.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
philumax
Posts: 38
Joined: May 30th, 2020, 2:04 pm

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by philumax »

This is a Google translation. I am French.
Good morning.
Thank you to Prophet4no1, for his explanation: since the time that I use Windows and his task manager, I had never realized, in this detail!
I would go to bed less stupid, tonight!
THANKS.
See you. :welcome:
User avatar
SilverAzide
Rainmeter Sage
Posts: 2736
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

prophet4NO1 wrote: May 27th, 2024, 2:47 am
Yincognito wrote: May 27th, 2024, 1:03 pm
Thanks for the snippet Yincognito! I tried it and it looks like, on my PC at least, that the "Cached" value in Task Manager is exactly this formula from your snippet:

Code: Select all

[PhysicalMemoryCached]
Measure=Calc
Formula=(ModifiedPageListBytes + StandbyCacheReserveBytes + StandbyCacheNormalPriorityBytes + StandbyCacheCoreBytes)
Screenshot 2024-05-27 121206.png
There's no rounding error either; your formula rounded to 1 decimal place matches Task Manager exactly. Looking at the MS article you linked, including CacheBytes throws off the number so it won't match Task Manager, and as you mentioned, I also don't see any counter "Standby Cache Code Bytes". The "System Code Total Bytes" counter always returns zero on my machine.
You do not have the required permissions to view the files attached to this post.
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Rainmeter Sage
Posts: 8127
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by Yincognito »

SilverAzide wrote: May 27th, 2024, 4:31 pm Thanks for the snippet Yincognito! I tried it and it looks like, on my PC at least, that the "Cached" value in Task Manager is exactly this formula from your snippet:

Code: Select all

[PhysicalMemoryCached]
Measure=Calc
Formula=(ModifiedPageListBytes + StandbyCacheReserveBytes + StandbyCacheNormalPriorityBytes + StandbyCacheCoreBytes)
Screenshot 2024-05-27 121206.png

There's no rounding error either; your formula rounded to 1 decimal place matches Task Manager exactly. Looking at the MS article you linked, including CacheBytes throws off the number so it won't match Task Manager, and as you mentioned, I also don't see any counter "Standby Cache Code Bytes". The "System Code Total Bytes" counter always returns zero on my machine.
No problem, happy to help! Your adjustment to the formula seems to yield extremely close values to those reported by Task Manager / Resource Monitor for me too, indeed:
Cached Memory SA.jpg
Looks like the "typo" in the article is worse than first thought (or maybe the article is slightly outdated?), given that "CacheBytes" is apparently not even part of this. That typo suits well with the visual glitch that displays "MBB" under "Modified" in the Resource Monitor window above. :D

P.S. Yes, the value also matches the GB one in Task Manager, I just prefer the Resource Monitor MB one since it has a higher granularity and differences are easier to spot on.
You do not have the required permissions to view the files attached to this post.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
SilverAzide
Rainmeter Sage
Posts: 2736
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

prophet4NO1 wrote: May 27th, 2024, 2:47 am
Yincognito wrote: May 27th, 2024, 5:49 pm
So, something like this...?
Image1.png
The "Cache" value is shown as a dimmer blue section on the RAM graph (and which = Modified + Standby) and matches Task Manager's value.
You do not have the required permissions to view the files attached to this post.
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Rainmeter Sage
Posts: 8127
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by Yincognito »

SilverAzide wrote: May 27th, 2024, 6:40 pm So, something like this...?

Image1.png

The "Cache" value is shown as a dimmer blue section on the RAM graph (and which = Modified + Standby) and matches Task Manager's value.
Looks very nice from my POV! :thumbup: Obviously, it's up to prophet4NO1 to share his opinion on it, since he was the one with the proposal / request. But yeah, he was right - it does look cool indeed. 8-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
emp00
Posts: 117
Joined: October 7th, 2022, 8:08 pm

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by emp00 »

SilverAzide wrote: May 27th, 2024, 6:40 pm So, something like this...?
The "Cache" value is shown as a dimmer blue section on the RAM graph (and which = Modified + Standby) and matches Task Manager's value.
Just another user's opinion, I also like it very much! By the way, the tooltip showing more info and giving explanations looks great as well. However, maybe some renaming would be good? Proposal:
- "In use --> "Total incl. file cache"
- "Modified" --> unclear to me what this shows, could maybe be deleted?
- "Standby" --> "Software RAM usage"
- "Free" --> Ok, of course self-explanatory
:-)

Question: In your screenshot, the percentage value (blue color, next to the bar) shows 43% -> this is now obviously the "lower" value of Software RAM usage without the file cache data. Previously, the higher percentage was shown here. Does this also mean, that this "lower" value will be shown in the graph (Graph / Show RAM) as well? That's fine, I think! Just wanted to hint on the graph display, making sure the skin is consistent in this respect.
User avatar
Yincognito
Rainmeter Sage
Posts: 8127
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Gadgets 7.7.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by Yincognito »

emp00 wrote: May 28th, 2024, 8:57 am However, maybe some renaming would be good?
This simply replicates what the Windows Resource Monitor (also shown in the screenshot) is displaying. Task Manager is just aggregating things slightly different.
emp00 wrote: May 28th, 2024, 8:57 am In your screenshot, the percentage value (blue color, next to the bar) shows 43% -> this is now obviously the "lower" value of Software RAM usage without the file cache data. Previously, the higher percentage was shown here.
I might be wrong, but I don't think another value was previously shown there. On the bar, the full blue is used RAM, the dim blue is cached RAM aka Modified + Standby, and the black is free RAM. I'm pretty sure that previously, the textual percentage next to the bar showed used RAM, just like it's showing now.

Don't know about the graphs though, SilverAzide should know best what was or will be there. I only clarified some things based on the posted screenshot. :)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth