I've installed CentOS 6.3 on a quad-four box. The model only indicated dual core but CentOS is telling me there are four. This is the first multi-core Linux installation I've had. What is the best way to utilize the multi-core CPUs? I'd like to distribute the load but I'm unsure how to do that.
mw
On Sun, Dec 23, 2012 at 05:22:52PM -0600, Mike Watson wrote:
I've installed CentOS 6.3 on a quad-four box. The model only indicated dual core but CentOS is telling me there are four. This is the first multi-core Linux installation I've had. What is the best way to utilize the multi-core CPUs? I'd like to distribute the load but I'm unsure how to do that.
Is it possible the motherboard is one of those that automatically unlocks hidden cores? sometimes, or so one hears, CPU vendors will lock some of the cores on a chip and sell it as having fewer cores than it actually has. The reasons usually given are either that some of the cores don't pass tests but the others do, or sometimes they need to fill gaps in production of the lower-end parts. some motherboards have technology (read: kludges) for discovering and unlocking such hidden cores. YMMV.
As for how to utilize it, the LInux scheduler will assign programs to the cores as it sees fit. If the app you want to run is multi-threaded, its threads will be distributed across multiple cores if the scheduler thinks there are CPU cycles going to waste on some cores.
I've heard that it is posible to tie a process to a specific core, but I have no idea how one does it in real life.
Fred
On 12/23/2012 06:40 PM, fred smith wrote:
On Sun, Dec 23, 2012 at 05:22:52PM -0600, Mike Watson wrote:
I've installed CentOS 6.3 on a quad-four box. The model only indicated dual core but CentOS is telling me there are four. This is the first multi-core Linux installation I've had. What is the best way to utilize the multi-core CPUs? I'd like to distribute the load but I'm unsure how to do that.
Is it possible the motherboard is one of those that automatically unlocks hidden cores? sometimes, or so one hears, CPU vendors will lock some of the cores on a chip and sell it as having fewer cores than it actually has. The reasons usually given are either that some of the cores don't pass tests but the others do, or sometimes they need to fill gaps in production of the lower-end parts. some motherboards have technology (read: kludges) for discovering and unlocking such hidden cores. YMMV.
As for how to utilize it, the LInux scheduler will assign programs to the cores as it sees fit. If the app you want to run is multi-threaded, its threads will be distributed across multiple cores if the scheduler thinks there are CPU cycles going to waste on some cores.
I've heard that it is posible to tie a process to a specific core, but I have no idea how one does it in real life.
Fred
I would think this is something you WOULDN'T want to do?...supposing that the core you tie a process to fails?....wouldn't that be something you'd like to avoid at all costs? I thought that was the whole premise for having multi-cores...not just for speed, but to also ensure that the processing power needed for multiple running apps was there and available. But these are just my own personal observations of course....
EGO II
On Sun, 23 Dec 2012 17:22:52 -0600 Mike Watson wrote:
The model only indicated dual core but CentOS is telling me there are four.
Hyperthreading, where two physical cores are split into four virtual cores.
So, if I understand you all correctly, I need do nothing. The kernel will utilize them all as needed.
If that correct?
mw
--
"Lose not thy airspeed, lest the ground rises up and smites thee." -- William Kershner http://crucis-court.com http://www.crucis.net/1632search
On 12/23/2012 05:51 PM, Frank Cox wrote:
On Sun, 23 Dec 2012 17:22:52 -0600 Mike Watson wrote:
The model only indicated dual core but CentOS is telling me there are four.
Hyperthreading, where two physical cores are split into four virtual cores.
On 12/23/2012 4:53 PM, Mike Watson wrote:
So, if I understand you all correctly, I need do nothing. The kernel will utilize them all as needed.
If that correct?
yes. a single process with a single thread will only use one CPU/core/thread at a time, but if you're running multiple processes at once, even something like a pipeline, then they will run in multiple cores as needed.
the 2 threads on each core are less than a whole CPU but more than 1/2. In particular, there is only one floating point unit.
Thank you.
mw
--
"Lose not thy airspeed, lest the ground rises up and smites thee." -- William Kershner http://crucis-court.com http://www.crucis.net/1632search