It is currently March 28th, 2024, 10:15 am

problem hiding not existing cores per CPU measure

Get help with creating, editing & fixing problems with skins
Yue
Posts: 59
Joined: March 23rd, 2023, 1:10 pm

Re: problem hiding not existing cores per CPU measure

Post by Yue »

Small question in between.
I´ve done my [not Rainmeter] technical homework. I will have to come up with a different design as planned [the result will be closely the same, but getting the values will be a different apporach]. Before I think of variants, I have a technical question, otherwise following questions might be a waste of everyone´s time.
As far as I know, cores most often have two logical processors [might become more in the future, who knows], sometimes just one. There are CPUs which combine both variants, while each core has its own [dynamic] frequency. So if you have a modern computer the number of logical processors can be very large [and a skin showing them could become using too much screen space easily].

I only have found skins and descriptions to show logical processors or the whole CPU usage, so I guess, what I am asking, isn´t possible in Rainmeter - or not recommendable.

My technical question: Would it be wise to show the values of percentage, frequencies [and temperature] of each core [depending on IF it´s possible to identify the corresponding logical processors [since this would need calculating the accumulation]?] or am I missing an important detail why the information per logical processor [while those values inevitably would be repeated if two belong to the same core] is more relevant?
I know this isn´t a technical forum. But since this question concerns the possibilities of Rainmeter directly and you both know much more about hardware than I do at the present time, I dare to ask.
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: problem hiding not existing cores per CPU measure

Post by Yincognito »

Yue wrote: May 9th, 2023, 11:20 amMy technical question: Would it be wise to show the values of percentage, frequencies [and temperature] of each core [depending on IF it´s possible to identify the corresponding logical processors [since this would need calculating the accumulation]?] or am I missing an important detail why the information per logical processor [while those values inevitably would be repeated if two belong to the same core] is more relevant?
Well, it's up to the skin designer. The most important data is the overall CPU usage, frequency and temperature. The per logical processor / core data (not physical core, since I'm not sure how one could identify it physically if, say, the logical processors would not be "in order" so that they can be "grouped" two by two or similar for each physical core, maybe SilverAzide knows more about that since I didn't even bother with the physical aspect and make my task more difficult than it was) is not as much intended to monitor each logical processor, but to - optionally, for the detail oriented users - display their situation and number. It's like being able to show a bunch of details in HWInfo and similar: most of them don't have a direct / critical importance, but it boosts the "coolness" of the software (hey, look how many things I can show you about this and that) and, of course, it only becomes really important if those details tell you something you must absolutely know (e.g. if you bought the right device, if its actual speed or parameters are what you thought they'll be, if any of the device parts has a problem, etc).

In the processor skin from my minimalist suite, for example, I chose to only display the overall CPU info at all times in the main skin (the "bar" at the top) and display the other details in another "tooltip skin" that's shown "on demand", on mouse over the main one's white title area:
CPU Details - MYiniMeter.jpg
SilverAzide, on the other hand, shows these things (and others, like RAM or pagefile; those are in another skin for me) by default in the same skin and area in his suite, but he also allows users to configure whether they want that level of detail (and the subsequently increased skin size):
CPU Details - Gadgets.jpg
or not:
CPU Details - Gadgets - Compact.jpg
via configuration from another skin. So, it really depends on how you want it to be, or what users you want to target if you envision releasing it publicly, how much space you want to reserve for it, and so on. For me, the above was pretty much the only logical option since only the main skin takes space permanently (though the custom tooltip system is slightly more complex that it seems), while many others keep it simpler and do it similarly with how your drive skin is. It depends on context.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: problem hiding not existing cores per CPU measure

Post by SilverAzide »

Yue wrote: May 9th, 2023, 11:20 am Small question in between.
I´ve done my [not Rainmeter] technical homework. I will have to come up with a different design as planned [the result will be closely the same, but getting the values will be a different apporach]. Before I think of variants, I have a technical question, otherwise following questions might be a waste of everyone´s time.
As far as I know, cores most often have two logical processors [might become more in the future, who knows], sometimes just one. There are CPUs which combine both variants, while each core has its own [dynamic] frequency. So if you have a modern computer the number of logical processors can be very large [and a skin showing them could become using too much screen space easily].

I only have found skins and descriptions to show logical processors or the whole CPU usage, so I guess, what I am asking, isn´t possible in Rainmeter - or not recommendable.

My technical question: Would it be wise to show the values of percentage, frequencies [and temperature] of each core [depending on IF it´s possible to identify the corresponding logical processors [since this would need calculating the accumulation]?] or am I missing an important detail why the information per logical processor [while those values inevitably would be repeated if two belong to the same core] is more relevant?
I know this isn´t a technical forum. But since this question concerns the possibilities of Rainmeter directly and you both know much more about hardware than I do at the present time, I dare to ask.
As you suspect, this can get quite complicated. A physical core in modern CPUs can have either one or two threads (a.k.a., logical cores). As far as I know, as of today, AMD CPUs are always hyperthreaded (two threads/core). Intel Alder Lake and later hybrid CPUs can have "efficiency cores" which are single-threaded and also run at a different base clock than the hyper-threaded "performance cores". No one has created a CPU with more than 2 threads per core (...yet).

There are CPUs (specifically thinking of AMD Threadrippers) with more than 64 logical cores. A single Threadripper/Epyc CPU can have up to 256 logical cores. You can also have servers with multiple CPUs (known as SMP), so core counts can get huge.

The next issue to consider is that -- regardless of core count -- Windows processes can see only 64 logical cores at a time. Machines with multiple CPUs or have large core counts can run in what is called "NUMA mode". (Normal PCs run in "UMA mode".) Windows creates "processor groups" and "NUMA nodes" that group cores together. There are some good resources on-line that describe these. But the key thing to keep in mind is that the max logical cores is 64, and if there are any more than that then your skin would need to be NUMA-aware.

The next important issue for your skins is that the CPU measure (or UsageMonitor measure with the CPU alias) does not work if there are more than 64 cores. There is a separate set of performance counters you need to use to get your usage data, and using them on a NUMA-enabled system can be rather tricky.

Finally, I will point out the obvious that CPU temperature sensors are "per physical core" or "per CPU chiplet" or "per CPU", depending on the model -- so not per logical core. You'll need to consider this if displaying temps on a skin that is showing logical core usage.

The only skin I know of that handles UMA, NUMA, and SMP processors with unlimited core counts is the All CPU Meter skin in my Gadgets suite. I had to create a plugin to fetch core configuration data, but you can gather a lot of info from HWiNFO. HWiNFO won't tell you everything, but it can tell you quite a lot, plenty for any skin needed by 99% of users.
Yue
Posts: 59
Joined: March 23rd, 2023, 1:10 pm

Re: problem hiding not existing cores per CPU measure

Post by Yue »

Yincognito » Today, 12:32 pm
[...] (hey, look how many things I can show you about this and that) [...]
[...] In the processor skin from my minimalist suite, for example, [...]
That´s exactly why I asked, because I don´t like the "because we can"-behaviour, but instead as useful as possible.
Yes, I saw that, because I took a look at a few skins [yours too] to eventually already get an answer to that technical question, but I couldn´t find [or if it was there, understand] an answer. In your skin, for example, I cannot see an option to show frequencies if there is a cpu with cores that have different clocking times. On the other hand my computer is a "problem" regarding this topic [only for checking on different core frequencies], because although I have a hyperthreading quad core, that needs repair I don´t have time for, I am working on an old dual core right now [both cores have the same clockspeed].

Regarding the possibility of different clocking times of different cores within one cpu curcuit + the potential amount af many, many logical processors led me to the question, whether it´s possible to identify the logical processors and the corresponding physical cores to calculate the usage of each core from the logical processors´usage in order to shorten the skin´s output. Before thinking any further, that´s why I first asked the "technical" question, if I missed something important and if what I am thinking of is even possible.

SilverAzide » Today, 1:44 pm
As you suspect, this can get quite complicated. A physical core in modern CPUs can have either one or two threads (a.k.a., logical cores). As far as I know, as of today, AMD CPUs are always hyperthreaded (two threads/core). Intel Alder Lake and later hybrid CPUs can have "efficiency cores" which are single-threaded and also run at a different base clock than the hyper-threaded "performance cores". No one has created a CPU with more than 2 threads per core (...yet).
Alright, that fits exactly what I read since yesterday, although my brain didn´t save the names "efficiency" and "performance" cores, because that seemed to be Intel-only names. :D
There are CPUs (specifically thinking of AMD Threadrippers) with more than 64 logical cores. A single Threadripper/Epyc CPU can have up to 256 logical cores. You can also have servers with multiple CPUs (known as SMP), so core counts can get huge.
...and that´s where you are losing me.^^ No, I understand it, sure, and I kept in mind amounts would become much larger if it comes to servers. I just don´t know about that stuff, maybe a few snippets, but nothing beyond that. But that confirms [boldly] my thought of focusing on logical ones only could become a [screen space] problem I should take into account right from the beginning of thinking of a different design than the orginally planned one.
The next issue to consider is that -- regardless of core count -- Windows processes can see only 64 logical cores at a time. Machines with multiple CPUs or have large core counts can run in what is called "NUMA mode". (Normal PCs run in "UMA mode".) Windows creates "processor groups" and "NUMA nodes" that group cores together. There are some good resources on-line that describe these. But the key thing to keep in mind is that the max logical cores is 64, and if there are any more than that then your skin would need to be NUMA-aware.
That´s far beyond my knowledge, although I once heard the mode names. But that´s long time ago. I think this would be overkeen. For now I am totally fine with creating a CPU skin working for usual private computers. Enhancements are always an option in my head, but for starters there is no need to make it work even with server [processor] capacaties - so sticking to UMA mode only for now would be good enough.
Finally, I will point out the obvious that CPU temperature sensors are "per physical core" or "per CPU chiplet" or "per CPU", depending on the model -- so not per logical core. You'll need to consider this if displaying temps on a skin that is showing logical core usage.
Yes, that´s clear. What I meant was, if two logical processors belong to the same core, showing the temperature in an output that focuses on logical processors would mean it would be shown two times. This, what I wrote before and the unknown future development of different CPU achitectures are the reason, why I rather would like to show the usage per core, but don´t know how. I can fetch the data from the logical processors, but don´t know if there is a way to find out, to which core they belong and so on [this becomes a summary of what was written before]...
But for now, let´s leave out the temperature and only talk about usage and frequencies. I can save space in my skin to add that later since temperatures are an independent approach [compared to the rest of the code] and I do not even know whether to use MSI Afterburner HWiNFo or maybe even some other software .
The only skin I know of that handles UMA, NUMA, and SMP processors with unlimited core counts is the All CPU Meter skin in my Gadgets suite. I had to create a plugin to fetch core configuration data, but you can gather a lot of info from HWiNFO. HWiNFO won't tell you everything, but it can tell you quite a lot, plenty for any skin needed by 99% of users.

I took a look at it, too. In fact I already did that once before on a different topic but back then didn´t know it was yours.^^
You - somehow - evaluate the physical cores. But I couldn´t find an documentation or something like that for the ActiveNet-plugin you wrote and use for this task. I could use a hint on that. But I guess, me not knowing anything about lua will become a stepping stone here, because as I can see, you use it for that part of your skin.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: problem hiding not existing cores per CPU measure

Post by SilverAzide »

Yue wrote: May 9th, 2023, 4:44 pm I took a look at it, too. In fact I already did that once before on a different topic but back then didn´t know it was yours.^^
You - somehow - evaluate the physical cores. But I couldn´t find an documentation or something like that for the ActiveNet-plugin you wrote and use for this task. I could use a hint on that. But I guess, me not knowing anything about lua will become a stepping stone here, because as I can see, you use it for that part of your skin.
I use Lua to configure the skin because the logic is more complicated than what you can do with Rainmeter. Lua is definitely not needed if you just want a simple/normal skin that shows 64 or fewer logical cores. If you add temperature monitoring into the mix, it gets a little more complicated, especially with hybrid CPUs or if you want to target multiple third-party utilities (i.e., supporting SpeedFan, CoreTemp, and HWiNFO).

P.S.: The ActiveNet doc is Gadgets\@Resources\ActiveNet_Readme.txt.
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: problem hiding not existing cores per CPU measure

Post by Yincognito »

Yue wrote: May 9th, 2023, 4:44 pmYes, I saw that, because I took a look at a few skins [yours too] to eventually already get an answer to that technical question, but I couldn´t find [or if it was there, understand] an answer. In your skin, for example, I cannot see an option to show frequencies if there is a cpu with cores that have different clocking times.
Yeah, I didn't do it in my skins indeed, which is curious now that I think about it, since I do display temperatures and usages for logical processors (somehow, I didn't consider doing the same for frequencies). Maybe I'll add it in a future version (which I already have worked on, just didn't release it yet due to other stuff I'd like to include and couldn't find the time and mood to tackle them properly - yes, it's regex's fault, lol), since space is not a problem in the tooltip skins, I can make them as big as I want.

In any case, it shouldn't be hard to do it, it would probably be about replicating what I mentioned in the last paragraph here, just for other logical processors instead of Name=0,_Total. Assuming it's only about logical processors, of course - physical ones are a topic that brings other things into the mix, as you could notice already from SilverAzide's description. It's not that I couldn't do it if I really wanted to, it's the wanting part that's the problem, lol, since it's this which is mostly driving me.
Yue
Posts: 59
Joined: March 23rd, 2023, 1:10 pm

Re: problem hiding not existing cores per CPU measure

Post by Yue »

SilverAzide » Yesterday, 5:23 pm
Lua is definitely not needed if you just want a simple/normal skin that shows 64 or fewer logical cores.
[...]
P.S.: The ActiveNet doc is Gadgets\@Resources\ActiveNet_Readme.txt.
I think here we have a little missunderstanding, because that much was clear. I considered using logical cores because I thought it wasn´t possible to show the usage of cores [eventually in sum of their logical processors, of course]. But your skin proves it is, so I will take a closer look into that .txt you pointed me to. As far as I understood from your skin´s code, you are "measuring" the physical cores by the ActiveNet-plugin.
[Maybe I will use the logicals additionally, but first I will try to understand your plugin and read that .txt]
If you add temperature monitoring into the mix, it gets a little more complicated, especially with hybrid CPUs or if you want to target multiple third-party utilities (i.e., supporting SpeedFan, CoreTemp, and HWiNFO).
Complicated. Sure. What else should it be me being interested in something.^^ By now I only know which software exists to accomplish that. I will get back to temperatures later, first I will keep it to usages and frequencies.
After that, this will be the next step and before asking anything about it I will have to read a lot to decide what software I want to use [that´s why I didn´t put it into the thread´s name because it´s not the right time]. I only mentioned temperatures, because last time I made my help request´s example too simple and therefore it lacked of a small but important detail that would have helped suggesting a good solution.
Yincognito » Yesterday, 5:55 pm
yes, it's regex's fault, lol
You like haunting me with that, hm? ;-) I guess, next time me needing it and getting a chance to get better at using it will come rather sooner than later. ^^
In any case, it shouldn't be hard to do it, it would probably be about replicating what I mentioned in the last paragraph here, [...]
I didn´t forget about that. Besides SilverAzide´s plugin I will look into that, too. That was the reason, why I meant I will need some time. But this little technical question in between was neccessary to not waste time on thinking of options that would lead to dead ends or could be realised easier. I read about the UsageMonitor in the beginning, but I did not need it until now. So this is a good opportunity to learn a little about it.
It's not that I couldn't do it if I really wanted to, it's the wanting part that's the problem, lol, since it's this which is mostly driving me.
I don´t understand what you are referring to - the cores?

So thanks for your advices and hints. :) Besides replying to your possibly following posts from now on I will be busy reading and testing and then report back.
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: problem hiding not existing cores per CPU measure

Post by Yincognito »

Yue wrote: May 10th, 2023, 5:42 pmYou like haunting me with that, hm? ;-) I guess, next time me needing it and getting a chance to get better at using it will come rather sooner than later. ^^
A little bit, yeah, at least partially - but come on, it was a nice - and useful - lil' adventure, wasn't it? :sly: But it really is about regex, actually: I would like to add sorting by date in my RSS/Atom feeds skin, since it's annoying me that sites insist in not doing that themselves and I get the same order for days when taking the first 20 items from a feed; this probably requires some Lua, and considering the complexity of the regexes there (what we talked about earlier was nothing in comparison) and the fact that it's been a while since I designed them, I need to be in a mood that would make me really interested in solving it. That has been eluding me for some time, hence postponing my suite update... :Whistle
Yue wrote: May 10th, 2023, 5:42 pmI didn´t forget about that. Besides SilverAzide´s plugin I will look into that, too. That was the reason, why I meant I will need some time. But this little technical question in between was neccessary to not waste time on thinking of options that would lead to dead ends or could be realised easier. I read about the UsageMonitor in the beginning, but I did not need it until now. So this is a good opportunity to learn a little about it.
Well, I did it already in (unreleased version of) my suite, so yeah. It's a bit crowded there now so I'll have spread things a bit next while keeping the layout of the other fields consistent, but the approach works:
Freqs.jpg
Yue wrote: May 10th, 2023, 5:42 pmI don´t understand what you are referring to - the cores?
Yep, the physical cores. My suite is already quite complex despite the minified impression, and I wouldn't like to add dependencies unless absolutely needed, so I'll skip such an implementation, at least for now. Maybe sometimes in the future, who knows? :confused:
Yue
Posts: 59
Joined: March 23rd, 2023, 1:10 pm

Re: problem hiding not existing cores per CPU measure

Post by Yue »

Yincognito » Yesterday, 7:59 pm
A little bit, yeah, at least partially - but come on, it was a nice - and useful - lil' adventure, wasn't it?
[...]
I need to be in a mood that would make me really interested in solving it. That has been eluding me for some time, hence postponing my suite update... :Whistle
Not complaining. I like that kind of humor. ;-) Adventurous? I wouldn´t use that word in such a context. It was fun. Although such things are just a side-interest, I like that stuff. Complexity, finding solutions that are more elegant, use less space, can easily be changed to accomplish something else...yes, regex is fun, although I do not know much about it yet. First steps, more will follow.

Ah, I get it. I have the same problem when it comes to my batch scripts to setup my system. The more complex it becomes, the more time it takes to get into it again, if it´s been a while since, and after that, whatever you want to add or change, isn´t done in a few minutes. So yes, it is about the mood.
Well, I did it already in (unreleased version of) my suite, so yeah. It's a bit crowded there now so I'll have spread things a bit next while keeping the layout of the other fields consistent, but the approach works
Have you thought of a slightly different layout like in blocks? When it comes to so many physical cores/logical processors it gets [a little] hard to see the the related values because the more there are, the more the eyes have to jump between the categories.
My suite is already quite complex despite the minified impression, and I wouldn't like to add dependencies unless absolutely needed, so I'll skip such an implementation, at least for now. Maybe sometimes in the future, who knows? :confused:
Well, as you wrote: It´s your suite. The design and changes are your decisions. Just simple like that.
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: problem hiding not existing cores per CPU measure

Post by Yincognito »

Yue wrote: May 12th, 2023, 12:37 amHave you thought of a slightly different layout like in blocks? When it comes to so many physical cores/logical processors it gets [a little] hard to see the the related values because the more there are, the more the eyes have to jump between the categories.
What do you mean by "in blocks"? You mean by item aka logical core instead of by category aka freqs-usages-temps? With lines like:

Code: Select all

[00000 MHz, 000 %, 000 °C] [00000 MHz, 000 %, 000 °C]
where values are grouped by the logical core they belong to? :???:
Post Reply