GitSquared / edex-ui

A cross-platform, customizable science fiction terminal emulator with advanced monitoring & touchscreen support.
GNU General Public License v3.0
40.49k stars 2.55k forks source link

Core Count Windows #990

Closed ivanjrt closed 3 years ago

ivanjrt commented 3 years ago

Technical information

Using version:

Running on:

How comfortable you are with your system and/or IT in general:

Problem

on the Windows side for the processors we have 3 values: CPU Count - aka Sockets specially in Workstations and servers Cores - How many cores are within the CPU(s) Logical Processors - How many logical processors are within a Core

it would seem that you guys are referring to the Logical Count , and -not the actual Core Count, no worries this is common mistake : ) ERR

Potential Fix, I'm not sure how are you guys getting this Telemetry on the backend so:

On PowerShell --Tested (Get-CimInstance -ClassName 'Win32_Processor').NumberOfCores

On C#: -- No tested but below is a short article, I was having issues loading using System.Management...; int coreCount = 0; foreach (var item in new System.Management.ManagementObjectSearcher("Select * from Win32_Processor").Get()) { coreCount += int.Parse(item["NumberOfCores"].ToString()); } Console.WriteLine("Number Of Cores: {0}", coreCount);

full source app sln, can be found here source : http://referencedesigner.com/blog/how-to-find-the-number-of-cores-and-logical-processors-using-c-net/1999/

GitSquared commented 3 years ago

It's not a mistake, most modern CPUs with HyperThreading or similar techs do indeed report more cores to the OS than there are physical cores on the die.

But those have optimized scheduling at the hardware level and are effectively capable of running tasks nearly in parallel, so as a user you shouldn't care about the difference.

What matters to you as a user is how many threads can run in parallel on your system and the "cores" display in edex tells you just that.