Re: need help on reading the output of "uname" with respect to SMP-enabled Linux
- From: Aragorn <stryder@xxxxxxxxxxxxxxx>
- Date: Sat, 21 Jan 2006 05:58:16 GMT
On Saturday 21 January 2006 06:35, hzmonte@xxxxxxxxxxx stood up and
spoke the following words to the masses in /comp.os.linux.misc...:/
> 1. What does the "#1" mean in the uname output? Does that mean 1
> physical processor?
The "hash-sign plus number" is actually part of a longer string which
includes a time and date. It is the kernel version upon build.
> 2. If so, why would one install a SMP kernel on a machine with only 1
> processor? So that hyperthreading would work? Does hyperthreading
> require the installation of an SMP kernel?
Hyperthreading is a technology currently used on many Intel CPU's which
allows a single physical processor to work as two - or on some
architectures even more - virtual CPU's by assigning otherwise unused
registers to the virtual siblings, effectively allowing the CPU to
execute two - or more, as above - processes at the same time.
If you have a hyperthreading-enabled CPU and you wish to take advantage
of this - it's less effective for single-tasking, but then again most
GNU/Linux machines already run multiple processes in the background, so
you do want this - then you must indeed use an SMP-enabled kernel.
If your machine has more than one hyperthreaded processor - e.g. I have
a dual Xeon with hyperthreading - then you also need to enable SMT -
"Symmetric Multi-Threading" - in the kernel's configuration, so that
the kernel can distinguish between physical and virtual CPU's when
doing load balancing. This feature only became available as of kernel
2.6 but has been backported as a patch to several 2.4 kernels.
> 3. I read /proc/cpuinfo in cases (2) and (3). Both report the
> existence of processor 0 and processor 1, but in the "physical id"
> field, both are 0. Does this "physical id" refer to physical
> processor id?
Yes it does. You may also want to check the field labeled "siblings".
If this is higher than the value of 1, then the CPU has multiple
virtual processors via hyperthreading.
I'm not sure however as to what value this field would have on dual-core
CPU's, but either way enabling both SMP and SMT on those will benefit
the load balancing - and thus the heat dissipation.
> So, does this mean processors 0 and 1 are just virtual processors
> due to hyperthreading?
Yes, or so it appears.
> 4. The output of dmesg in case (3) has these:
> LAPIC (acpi_id[0x0000] id[0x0] enabled[1])
> CPU 0 (0x0000) enabledProcessor #0 Pentium 4(tm) XEON(tm) APIC version
> 16
> LAPIC (acpi_id[0x0001] id[0x1] enabled[1])
> CPU 1 (0x0100) enabledProcessor #1 Pentium 4(tm) XEON(tm) APIC version
> 16
> 2 CPUs total
> Intel MultiProcessor Specification v1.4
> Processors: 2
> Initializing CPU#0
> CPU: Trace cache: 12K uops, L1 D cache: 8K
> CPU: L2 cache: 512K
> CPU: Physical Processor ID: 0
> CPU: Trace cache: 12K uops, L1 D cache: 8K
> CPU: L2 cache: 512K
> CPU: Physical Processor ID: 0
> CPU0: Intel(R) Pentium(R) 4 CPU 3.00GHz stepping 09
> Initializing CPU#1
> CPU: Trace cache: 12K uops, L1 D cache: 8K
> CPU: L2 cache: 512K
> CPU: Physical Processor ID: 0
> CPU1: Intel(R) Pentium(R) 4 CPU 3.00GHz stepping 09
> Total of 2 processors activated (11953.76 BogoMIPS).
> cpu_sibling_map[0] = 1
> cpu_sibling_map[1] = 0
> cpu: 0, clocks: 1996582, slice: 665527
> CPU0<T0:1996576,T1:1331040,D:9,S:665527,C:1996582>
> cpu: 1, clocks: 1996582, slice: 665527
> CPU1<T0:1996576,T1:665520,D:2,S:665527,C:1996582>
> smp_num_cpus: 2.
> How many physical processors on earth do I have?
You have one physical processor, acting as two virtual processors. The
Pentium 4-based Intel Xeons with a 512 KB cache and above all have
hyperthreading.
If so desired, you can disable hyperthreading - which is not recommended
in GNU/Linux or other UNIX/POSIX systems - from within the BIOS set-up
program or via the /acpi=off/ statement in the /append/ line for the
kernel in your bootloader configuration - or alternatively as a
manually entered boot parameter.
Hyperthreading requires for a minimal amount of ACPI initializing, hence
the options /acpi=off,/ /acpi=ht/ and /acpi=on./ The latter two will
initialize hyperthreading if available.
My Xeons are 2.2 GHz with a 400 MHz front side bus and also with 512 KB
cache, by the way. ;-)
--
With kind regards,
*Aragorn*
(Registered GNU/Linux user #223157)
.
- References:
- Prev by Date: Re: need help on reading the output of "uname" with respect to SMP-enabled Linux
- Next by Date: Re: Change the name "daemon" to something better!
- Previous by thread: Re: need help on reading the output of "uname" with respect to SMP-enabled Linux
- Next by thread: RealPlayer and FireFox (1.5)
- Index(es):
Relevant Pages
|