politicalgogl.blogg.se

Cpuinfo hyperthreading
Cpuinfo hyperthreading












cpuinfo hyperthreading

The information provided on each of the virtual processors on this particular system looks like this. So, two processors can swing a lot more processing power than is immediately obvious and /proc/cpuinfo This tells you that each of the physical processors has essentially twelves cores but, again, only because hyper-threading tells the system that for every physical core, there are two cores. The other clue is the number of "siblings" reported for each of the virtual processors: $ grep siblings /proc/cpuinfo The extra twelve tell us that multi-threading is also in use.

cpuinfo hyperthreading

If each processor has six cores, that would still only account for twelve virtual processors. In the system we've been looking at above, we saw two physical processors, 24 virtual processors and six cores. If the number of cores shown is less than the number of virtual processors, your system is multi-threading. This line will show up for each virtual processor. The way to tell how may cores you have is to look for "cpu cores" in your /proc/cpuinfo file. You might have more virtual processors than physical processors because your processors are mutli-core, because your processors are hyper-threaded, or both. That sounds much more interesting! Even this, however, doesn't tell you the whole story. $ grep "^processor" /proc/cpuinfo | wc -l You can count those by looking for lines that start with "processor". If your processors are multi-core, you need to know how many virtual processors you have.

cpuinfo hyperthreading

We likely have a lot more processing power than the number of CPUs indicates. processors, that's all we would have needed to know, but these days, that only tells us part of the story. There are two physical CPUs on this particular system. Note that any particular physical id may appear in the file more than once, so you want to sort lines that contain that string (e.g., "physical id : 0") to be sure that each gets counted only once. This tells you how many physical processors are on your system, but doesn't answer questions about how many cores or whether your system is using hyper-threading. $ grep "physical id" /proc/cpuinfo | sort | uniq | wc -l














Cpuinfo hyperthreading