PDA

View Full Version : Does Fedora automatically use all available cores?


Jongi
11th October 2009, 07:08 PM
Or is there a setting that has to be enabled?

Firewing1
11th October 2009, 07:19 PM
Fedora Core 6 (I think) was the first Fedora release to enable SMP in kernels by default, so any kernel you run in Fedora 11 should expose all cores to the system. Whether they're used or not gets a bit more tricky to answer since it depends on if the applications are multithreaded or not, but in general yes the system will use all cores available when possible. For example running x264 (a video transcoder) should be considerably faster on a dual or quad core CPU than a single core CPU.

Jongi
11th October 2009, 07:26 PM

sorry what i meant is whether I have to explictly tell Fedora there is more than one core available. I understand the application limitations.

Thanks

SlowJet
11th October 2009, 07:31 PM
Dual and Quad core intel do not have HT so the most likely usage would be two different programs would run on different cores.

The Intel i7 is HT again. But HT for 64-bit? I don't believe it exist.

SJ

P.S. There are over 100 tasks running on a Fedora Desktop so 4 core will get plenty of usage in 32 bit.

Jongi
11th October 2009, 07:47 PM
I have an I7 so want to make sure it is used optimally

Firewing1
11th October 2009, 08:03 PM
The SMP kernel feature has been enabled for some time now, so all the cores are available to the system.

SlowJet
11th October 2009, 08:21 PM
Wow, it will be one of the fastest 32-bit systems on the planet. :)

SJ

hephasteus
12th October 2009, 02:51 PM
Dual and Quad core intel do not have HT so the most likely usage would be two different programs would run on different cores.

The Intel i7 is HT again. But HT for 64-bit? I don't believe it exist.

SJ

P.S. There are over 100 tasks running on a Fedora Desktop so 4 core will get plenty of usage in 32 bit.

Yep. It just takes a lot more silicon space. HT puts in reduntant address units to try to speed up the work flow. The theory is 15 percent of the space of a real core gives 30 percent higher speeds. But in 64 bit those percentages get worked over negatively. But when Intel starts dropping valuable CPU features for it then it's just a bit too redilculous. You can't rely on an instruction being present in an Intel CPU without a game card because they throw stuff out just to try to corral people into higher pricepoint cpu's. It's like a wonderful fusion of shopping and dodgeball. With hammers.

diamond_ramsey
13th October 2009, 12:53 AM
Dual and Quad core intel do not have HT so the most likely usage would be two different programs would run on different cores.

The Intel i7 is HT again. But HT for 64-bit? I don't believe it exist.

SJ

P.S. There are over 100 tasks running on a Fedora Desktop so 4 core will get plenty of usage in 32 bit.

SlowJet, good questions. :)

:) HT for 64-bit exists. :)

I have a two core, two socket system and HT with my 64-bit Intel IntelŽ XeonŽ processors. :)

IntelŽ vPro™ technology -

http://www.intel.com/technology/vpro/index.htm?iid=tech_product+vpro

IntelŽ Hyper-Threading Technology (IntelŽ HT Technology) -

http://www.intel.com/technology/platform-technology/hyper-threading/index.htm?iid=tech_product+ht

What interests me immensely is IntelŽ Virtualization Technology -

http://www.intel.com/technology/virtualization/technology.htm?iid=tech_vt+tech

On one system, the double core value is showing up successfully for me with F12 Alpha now. :)

Hope this helps. ;)

SlowJet
13th October 2009, 03:00 AM
Your links are pointing to Pentium 4's and chipsets.
Or they don't come up at all.
Old tech.

"* Fedora 12 (Constantine) kernels - vmlinuz-2.6.31-33.fc12.i686 and vmlinuz-2.6.31.1-56.fc12.i686.PAE
With eight (8) x86_64 computing cores, 16 GB of RAM and SATA Seagate 7200.12 500 GB harddisk."""

No such animal exits. If it is i686 then it is 32-bit. If you have an i7 quad, then your 32-bit would show 8 cpu's.


SJ

diamond_ramsey
13th October 2009, 03:59 AM
Your links are pointing to Pentium 4's and chipsets.
Or they don't come up at all.
Old tech.

"* Fedora 12 (Constantine) kernels - vmlinuz-2.6.31-33.fc12.i686 and vmlinuz-2.6.31.1-56.fc12.i686.PAE
With eight (8) x86_64 computing cores, 16 GB of RAM and SATA Seagate 7200.12 500 GB harddisk."""

No such animal exits. If it is i686 then it is 32-bit. If you have an i7 quad, then your 32-bit would show 8 cpu's.


SJ

:) SlowJet, thank you for your update. :)

You're right the first and third links stopped ?:)

The first link, I updated above to go to the direct location. :)

The third link is titled, "More on IntelŽ VT" and was from -

http://www.intel.com/technology/virtualization/

Yes, the listed Fedora kernels referenced are all 32-bit kernels of my seven test systems. Six of the test systems run with 1.5 GB of memory and the last one is running at 3.0 GB of memory. :)

You're right, I do not have a i7 system. My production system is a dual socket, dual core XEON. The XEON chips are 64-bit and allow HT. My XEON chips are not VT capable so I am not able to run the listed Fedora guest kernels in 64-bit mode. :)

Hope this helps. ;)

diamond_ramsey
13th October 2009, 06:12 AM
I have an I7 so want to make sure it is used optimally

:) Jongi, as a consideration for your i7 based system, here is some food for thought. :)

My system is based upon the integration of component parts, in order to support the multi-core cpu. :)

For example, from my understanding of system-based bottlenecks -

* Disk I/O
* Memory
* CPU
* Network
* Graphics

Depends on what I choose to use my system for. Examination of how things are working beforehand and establish a baseline is best. In time, an evaluation of what's working successfully and what may need to be tweaked/upgraded is always advantageous. :)

FYI, I went with the Seagate BarracudaŽ 7200.12 Desktop Hard Drives -

http://www.seagate.com/www/en-us/products/desktops/barracuda_hard_drives/barracuda_7200.12

Hope this helps. ;)

stevea
13th October 2009, 07:11 AM
The cores can be x86_64 and you can still run i686 code.
Yes hyperthreading works as expected in 64bit instruction streams. If you hunt the intel website you can find performance graphs of 32 vs 64 w/ HT on & off. To expand hepheastus' point I believe the HT technology pulls and starts decoding a second instruction stream, but there is a single set of execution units. IIRC the Atom 330 has 2 cores, HT & x86_64.
There have been all sorts of 8x core systems w/ Xeon for years.

P.S. There are over 100 tasks running on a Fedora Desktop so 4 core will get plenty of usage in 32 bit.

Nope wrong, "do the math" as someone says.

You need 4 RUNNABLE tasks to keep 4 cores busy, not just 4 tasks, and that's not real common on a home system. Look at load average in /proc/loadavg or in the top few lines when you run "top". Then consider that top or the cat of /proc/loadavg is one of the runnable processes counted there.

Jongi
13th October 2009, 09:03 AM
The question related to the fact that in Debian one has to set EXPORT_CONCURRENCY and in Gentoo you have to set MAKEOPTS. So was just wondering if there was a similar setting in Fedora.

SlowJet
13th October 2009, 10:54 AM
The cores can be x86_64 and you can still run i686 code.
Yes hyperthreading works as expected in 64bit instruction streams. If you hunt the intel website you can find performance graphs of 32 vs 64 w/ HT on & off. To expand hepheastus' point I believe the HT technology pulls and starts decoding a second instruction stream, but there is a single set of execution units. IIRC the Atom 330 has 2 cores, HT & x86_64.
There have been all sorts of 8x core systems w/ Xeon for years.



Nope wrong, "do the math" as someone says.

You need 4 RUNNABLE tasks to keep 4 cores busy, not just 4 tasks, and that's not real common on a home system. Look at load average in /proc/loadavg or in the top few lines when you run "top". Then consider that top or the cat of /proc/loadavg is one of the runnable processes counted there.

I did the math, you did the myth.
Tiiimmme, is on your side,
yeah, yeah, yeah, yes it is
Tiiiimmme is on your side
NOT!

http://en.wikipedia.org/wiki/Xeon

My computer is running 10 tasks not counting top as I type this.
Count with with me.
1
2
3
4
5
6
7
8
9
TEN!
Now say 2010 8 core chips.

SJ

AdamW
13th October 2009, 10:38 PM
jongi: no, you don't have to make any special configuration changes.

diamond_ramsey
14th October 2009, 02:52 AM
The question related to the fact that in Debian one has to set EXPORT_CONCURRENCY and in Gentoo you have to set MAKEOPTS. So was just wondering if there was a similar setting in Fedora.

Concurrence with AdamW on not having any special configuration changes. :)

:) Jongi, I would only add that to make sure that the irqbalance service is running. :)

I find that the irqbalance service is useful to me. :)

Hope this helps. ;)

typerlc
15th October 2009, 01:14 AM
My computer is running 10 tasks not counting top as I type this.

How did you count those? They have to be in the run queue to be counted.

The easiest way to tell how many are in the run queue is to run this command:

vmstat 1

The first column (heading "procs r" is the number of processes (that second) waiting to be run (or running) i.e. runnable i.e. in the run queue. etc.

Most of the time, my system has 0-4 runnable processes. And I have firefox, terminal, kde, VirtualBox (running windows), OpenOffice, etc. all open at the same time. If I count the number of processes started, there are around 170 currently. Most of them spend most of their time idle.

Of course, everyone does different things with their computer, but in a desktop, typically there aren't that many processes actually competing for cpu time. So lots of cores won't help the majority of users the majority of the time.

SlowJet
15th October 2009, 10:58 AM
Well, if you had a pizza crust and only 1 pizza girl, she would take a lot longer to make 4 topping pizza than
4 pizza girls dumbing the topping on at the same time.

If the pizza had to go through several processes and their was a pizza girl at each station, usually the Saturday rush, then one could say they make one pizza instantly.

But if 1 pizza girl had to move the crust down a line and put on more toppings, as usually the case on Monday's, then it will take the pizza girl a longer time to make a pizza.

I don't know about you, but I don't like waiting for my pizza.

SJ

typerlc
15th October 2009, 10:20 PM
your analogy is flawed in several ways. A closer, but still flawed analogy is that the 4 girls can each work on one pizza each. So if you get 4 orders in, they'll each work on one pizza in parallel. As you can see they will work faster than 1 girl making all 4, but not 4*faster. There is contention for access to the dough and toppings.

Now, consider you want to speed up your pizza making further, and hired another 4 girls (8 now). The problem you have is that you didn't analyze your orders. If you had, you would gave seen that at any one time you only have up to 4 orders. So only 4 girls are busy. You've wasted a lot of money on staff for the rare occasions you have more than 4 orders.

You can put some of these girls on housekeeping duties, but that doesn't take much time.

Anyway, you may or may not benefit from more cores. Depends on your usage patterns. In my everyday desktop usage I wouldn't benefit from more than 4, except on the odd occasion I transcode some videos or something silly like that.

typerlc
17th October 2009, 01:17 AM
transcoding video isn't an entirely safe example; many encoders for Linux are not multithreaded. ffmpeg isn't multithreaded by default yet, so any encoding done via ffmpeg doesn't benefit from multiple cores unless you do multiple videos at

I wasn't referring to the number of cores any single application may be able to use. Just the fact that you need CPU intensive apps (and several) of them to get your run queue high enough to benefit from large numbers of cores.

AdamW
17th October 2009, 01:37 AM
I removed the post you quoted as it's not entirely accurate. but of course you're correct :)