Re: utilising multi-core/-processor support in linux
- From: Aragorn <stryder@xxxxxxxxxxxxxxx>
- Date: Mon, 28 Aug 2006 09:19:50 GMT
On Monday 28 August 2006 11:01, Tom Forsmo stood up and addressed the masses
in /comp.os.linux.misc/ as follows...:
Hi
I recently bought a centrino dual core machine, and compiled a kernel
2.6.17.8 with support for kernel threading and 2 processors/cores.
Perhaps you should have set it up for 4 processors, because if those cores
are hyperthreaded - and provided that hyperthreading is enabled in the BIOS
_and_ that you're running an ACPI interpreter - then you have 4 logical
CPU's.
When I tried utilising both cores, I had a look at top/ps to see if
linux distributed the processes/tasks to both processors, but according
to it it only used one of the cores.
/top/ normally defaults to showing a non-SMP view. You should press "1" to
enable an SMP view.
Looking at the web for information on how to control and utilise
multi-processors/cores in linux only yield information about linux
supporting in 2.2/2.4 kernels and some odd information on how to
programm for it. Not how to verify it is beeing utilised, in what way or
if there are things that need to be configured for it to work properly.
2.2 and 2.4 Linux kernel generations are by default not good choices for
hyperthreaded or multi-core CPU's in physical SMP set-ups because they
don't normally distinguish between a physical CPU and a hyperthreaded
sibling or an on-chip second core, which leads to poor load balancing and
may cause one physical CPU to generate more heat and do all the work when
another physical CPU is completely idle.
I would advise sticking to a 2.6 kernel for such a machine.
So my question is, how can i verify its use and is there anything that
needs to be done to existing programs or the linux distro to utilise it.
The kernel will dispatch processes across the available CPU
cores/hyperthreads as it sees fit, but in order to take advantage of true
multi-threading, your application software itself has to support it.
If it doesn't, then the kernel can run process abc on one CPU and process
xyz on another one, but those will then be the entire processes. Threads
are also being used but are only implemented at the kernel level, i.e. for
kernelspace processes.
If you want your userspace processes to support threads - and to thus
execute faster on a multi-threaded machine - you'll have to compile them
with thread support. Older GNU/Linux distributions make use of the
so-called Linux Threads (LT), while newer distributions make use of the
Native POSIX Threads for Linux (NPTL), with or without support for the
older Linux Threads.
An example of an application that usually supports threads is The Gimp, and
KVIrc - an excellent Qt-based IRC client - also supports threads.
Any information, pointers or good articles explaining system
administration of smp functionality is highly appreciated.
Your Google's as good as mine... ;-)
--
With kind regards,
*Aragorn*
(registered GNU/Linux user #223157)
.
- Follow-Ups:
- Re: utilising multi-core/-processor support in linux
- From: Tom Forsmo
- Re: utilising multi-core/-processor support in linux
- References:
- utilising multi-core/-processor support in linux
- From: Tom Forsmo
- utilising multi-core/-processor support in linux
- Prev by Date: utilising multi-core/-processor support in linux
- Next by Date: Re: alias/script to access Google archives? (was Re: A question about windoze trolls)
- Previous by thread: utilising multi-core/-processor support in linux
- Next by thread: Re: utilising multi-core/-processor support in linux
- Index(es):
Relevant Pages
|