1

Possible Duplicate:
Is Ubuntu optimized for multicore CPUs?

I'm looking for a new laptop, one on which I am able to install (and multi-boot) Ubuntu. Some laptops offer processors with multi-threading, but I'm wondering whether it makes any sense to have such a core: Does Ubuntu OS support it, and are there (m)any apps that support it?

Thanks in advance!

Koen
  • 532
  • 1
    Do you mean to ask about laptops with processors that support hyperthreading? Or with processors that have multiple cores? Multithreading is an OS or application feature, which can be faciliated by processor architecture, but which is possible in some form even on the oldest PC's running operating systems as old as DOS. Preemptive multitasking must be faciliated by CPU architecture, but all CPU's since the 386 have facilitated it. I recommend either clarifying your question to make it more specific, or explicitly expanding it to make more general. Right now it's hard to answer. – Eliah Kagan Jul 12 '12 at 20:15

3 Answers3

2

All laptops allow multi-threading to work. Even the Intel laptops without HyperThreading generally all have at least 2 CPU cores, so you will still get SMP support. A lot of apps don't use threads though, so those apps may not generally see any benefit, or it may not be obvious. Even without it though, the kernel can place processes on other cores when started, which allows things to run faster.

dobey
  • 40,982
1

I recently bought an Intel i7 2670QM laptop recently. It sports 4 cores, plus 4 virtual cores (8cores). I have to admit that I am not very impressed with this processor. Firefox generally supports multi-threading, but most programs do not, so I'm usually Maxing out at about 15-25% of this cpu's potential performance. If I had it to do over again, I probably would have went with a CPU with less cores, and more power per core. Fortunately, as multi-core systems become more popular, more software will become multi-threaded, but we just aren't quite yet there today.

Sepero
  • 4,557
0

Although the kernel does handle assigning cores to processes, CPU affinity can be viewed and manually set for a process using taskset- see man taskset. However, it should be said that this is only used in very particular circumstances, and in an instance when, perhaps for a benchmarking or troubleshooting task, one wants to run one process in one particular core. One can find the pid of a process with ps -oe pid,args then query taskset for that affinity: taskset -p <pid>, which will return something like pid 2027's current affinity mask: 1.

To find the number of processing units available, use nproc- see man nproc. If you need to run an old app or game on a single core you can launch it with taskset -c <core> <app>. (Cores begin at 0). Other programs such as xargs can be made to run with parallel execution units using the P switch followed by n (number required)- see man xargs.