Alok's Blog

64-Bit, Multi-Core, and Hyper-Threading Technology Processors

64-Bit Processors
In 2004, the 64-bit processor was introduced into the computer market. In the beginning, these 64-bit processors were only used for  servers, but ones such as the AMD Athlon™ 64 are now being used for desktop computers as well.
Red Hat Enterprise Linux supports both 32-bit and 64-bit processors. If you have a system with a 64-bit processor, install the 64-bit version of the operating system if you want the 64-bit kernel, libraries, and available applications to be installed.
Most of the modern 64-bit processors such as the AMD64 and EM64T can also run 32-bit applications if the operating
system also supports it. 32-bit support is installed by default when installing the 64-bit version of Red Hat Enterprise Linux.
To run both 32-bit and 64-bit applications, both sets of libraries must be installed. Having both the 64-bit and 32- bit versions of a library installed at the same time is known as multilib. Red Hat Enterprise Linux allows for this by following the FHS guidelines. 32-bit libraries are installed in /lib/ and /usr/lib/, and 64-bit libraries are installed in /lib64/ and /usr/lib64/.
NOTE
For the complete FHS guidelines explanation of how 32-bit and 64-bit libraries co-
exist, refer to http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64.

Some packages have been compiled for the 64-bit architecture but are available in a 32-bit version as well. When using Red Hat Network to install a package on a 64-bit system with the 64-bit version of the OS installed, the 64-bit version of the package is installed if
available. If the 32-bit version is the only one available, it is installed. If both versions are available, the architecture can be specified if installing from Red Hat Network:

yum install <package_name>.<arch>
Replace <arch> with the 32-bit architecture compatible with your 64-bit processor such as i386 for Intel Itanium, AMD64, and EM64T systems. If you are selecting a package to install via the RHN website, the architecture is included in the package name such as
glibc-2.3.4-2.i686 and glibc-2.3.4-2.ia64. If you are installing software directly from the RPM package file, remember that the filename includes the architecture such as glibc-2.3.4-2.i686.rpm. Table 8.1 shows the architecture abbreviations used in the RPM
filename and in the package name listed on the RHN website. It also shows the compati- ble 32-bit architectures.
TABLE 8.1        Compatible Architectures
Processor                   RPM Architecture          Compatible 32-Bit Architectures
Intel Itanium               ia64                      i386, i686
AMD64, EM64T        x86_64                 i386, i686
IBM POWER              ppc64                 ppc
IBM zSeries                 s390x                 s390
After installing both versions of a library, how can you verify they are both installed? The rpm -q <package-name> command doesn’t display the architecture of the package by default. But, the command can be configured to show this information by using the –queryformat option:
#rpm -q <package-name> –queryformat=’%{NAME}-%{VERSION}.%{ARCH}\n’

This changes the format displayed to also include a period at the end of the package name followed by the architecture such as the following for two different builds of glibc:
glibc-2.3.4-2.19.i686
glibc-2.3.4-2.19.x86_64
This option is very useful, but it is not easy to remember. Luckily, this format can be saved as the default for each user. In your home directory, create a .rpmmacros file if you don’t already have one. In this file, add the following line:
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}

Duplicate this file for each user who wants to view the architecture of the packages queried.
TIP
Add this formatting line to the .rpmmacros file for the root user as well if you often
perform RPM queries as root.
Multi-Core Processors
A multi-core processor is a processor that contains one or more processor cores on a single processor chip, with each core having its own dedicated cache. The advantages of using multi-core processors include the following:
>. More processor cores on a single processor means a smaller physical footprint for a multi-processor machine. More processor cores       can fit in a single unit.
>. If combined with Virtualization or a similar technology, each processor core can be dedicated to a virtual machine. Just switching to dual-core processors doubles the number of virtual machines with a dedicated processor. Refer to Appendix B, “Creating Virtual  Machines,” for details on implementing the Virtualization layer.

The Linux kernel recognizes the number of physical processors, the number of processor cores on each physical processor, and the total number of processor cores. It uses each processor core as it would a separate physical processor. In addition to the processor vendor, speed, and cache size, the /proc/cpuinfo virtual file shows information about the processor cores. To view the contents of this virtual file, use the cat /proc/cpuinfo command.

Listing 8.1 shows the output on a system with two processors, with each processor having two processor cores. The processor field counts the total number of processor cores for the entire system. In Listing 8.1, this value starts with 0 and ends with 3, for a total of
four processor cores. The total number of physical processors is two, as shown by the physical id field starting at 0 for the first processor core and ending at 1 for the last processor core. The value of the cpu cores field is the total number of processor cores on
the physical processor. The core id field counts the number of processor cores for each physical processor.
LISTING 8.1     Contents of /proc/cpuinfo for a 2-Processor, Dual-Core System
processor          : 0
vendor_id          : AuthenticAMD
cpu family         : 15
model                 : 33
model name         : AMD Opteron(tm) Processor 860
stepping           : 2
cpu MHz            : 1607.417
cache size       : 1024 KB
physical id      : 0
siblings         : 2
core id          : 0
cpu cores        : 2
fpu              : yes
fpu_exception    : yes
cpuid level      : 1
wp               : yes
flags            : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge \
mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext lm \
3dnowext 3dnow pni
bogomips         : 3218.03
TLB size         : 1088 4K pages
clflush size     : 64
cache_alignment : 64
address sizes    : 40 bits physical, 48 bits virtual
power management: ts ttp
processor        : 1
vendor_id        : AuthenticAMD
cpu family       : 15
model            : 33
model name       : AMD Opteron(tm) Processor 860
stepping         : 2
cpu MHz          : 1607.417
cache size       : 1024 KB
physical id      : 0
siblings         : 2
core id          : 1
cpu cores        : 2
fpu              : yes
fpu_exception    : yes
cpuid level      : 1
wp               : yes
flags            : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca \
cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext lm 3dnowext \
3dnow pni
bogomips         : 3214.44
TLB size         : 1088 4K pages
clflush size     : 64
cache_alignment :  64
address sizes    : 40 bits physical, 48 bits virtual
power management: ts ttp
processor       : 2
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : AMD Opteron(tm) Processor 860
stepping        : 2
cpu MHz         : 1607.417
cache size      : 1024 KB
physical id     : 1
siblings        : 2
core id         : 0
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca \
cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext lm 3dnowext \
3dnow pni
bogomips        : 3214.42
TLB size        : 1088 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp
processor       : 3
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : AMD Opteron(tm) Processor 860
stepping        : 2
cpu MHz         : 1607.417
cache size      : 1024 KB
physical id     : 1
siblings        : 2
core id         : 1
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags             : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca \
cmov pat pse36  clflush mmx fxsr sse sse2 ht syscall nx mmxext lm 3dnowext \
3dnow pni
bogomips          : 3214.42
TLB size          : 1088 4K pages
clflush size      : 64
cache_alignment :   64
address sizes     : 40 bits physical, 48 bits virtual
power management:   ts ttp
Processors with Hyper-Threading Technology
Processors with Hyper-Threading Technology (HT Technology) are seen by the operating system as two logical processors. These processors are different from multi-core processors because processors with HT Technology do not contain all the components of two sepa- rate processors. Only specific parts of a second processor are included so that two process
threads can be executed at the same time. When Red Hat Enterprise Linux detects a processor with HT Technology, it configures the
system as a multi-processor system, and therefore uses the SMP kernel. This can be seen in the output of the /proc/cpuinfo virtual file as shown in Listing 8.2.
LISTING 8.2     Contents of /proc/cpuinfo for a Process with HT Technology
processor         : 0
vendor_id         : GenuineIntel
cpu family        : 15
model             : 3
model name        : Genuine Intel(R) CPU 3.20GHz
stepping          : 3
cpu Mhz           : 2793.829
cache size        : 1024 KB
physical id       : 0
siblings          : 2
core id           : 0
cpu cores         : 1
fdiv_bug          : no
hlt_bug           : no
f00f_bug          : no
coma_bug          : no
fpu               : yes
fpu_exception     : yes
cpuid level       : 5
wp                : yes
flags             : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni
monitor ds_cpl cid
bogomips           : 5592.02
processor          : 1
vendor_id          : GenuineIntel
cpu family         : 15
model              : 3
model name         : Genuine Intel(R) CPU 3.20GHz
stepping           : 3
cpu Mhz            : 2793.829
cache size         : 1024 KB
physical id        : 0
siblings           : 2
core id            : 0
cpu cores          : 1
fdiv_bug           : no
hlt_bug            : no
f00f_bug           : no
coma_bug           : no
fpu                : yes
fpu_exception      : yes
cpuid level        : 5
wp                 : yes
flags              : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni
monitor ds_cpl cid
bogomips           : 5585.63

————————————————————————————————————————-

Similar to the previous example for the multi-core processors, look at the processor, physical id, core id, and cpu cores fields to verify that the system is recognized as one with HT Technology. The processor count goes from 0 to 1, indicating that, as far as the
operating system is considered, there are two processors to send data to for execution. The physical id is 0 for both, meaning that there is only one physical processor. The value of cpu cores is 1, and the value of core id is 0 for both, meaning that the proces- sor is not a multi-core processor. Thus, the processor must have HT Technology because the virtual processor count is 2 with only one processor core.
Hyper-Threading can be disabled at boot-time with a kernel option passed to the kernel using the GRUB boot loader. This process only disables Hyper-Threading for one boot instance. It must be repeated on subsequent boots to continue disabling Hyper-Threading.
The steps are as follows:
1. When the GRUB boot menu appears, use the up and down arrows to select the
kernel to boot.
2. Press the E key to add a kernel option to the kernel selected.
3. At the end of the line, add a space and then the noht kernel option.
4. Press Enter to return to the GRUB boot menu.
5. Press the B key to boot the system.
Hyper-Threading can be disabled for all subsequent boots if the kernel option is added to the GRUB configuration file. As root, open the /etc/grub.conf file and find the kernel stanza for which you want to disable Hyper-Threading. Find the kernel line for the stanza,
add a space to the end, and add the noht kernel option as shown in Listing 8.3.

LISTING 8.3     Disabling Hyper-Threading with GRUB
default=0
timeout=15
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux (2.6.16-1.2133)
root (hd0,0)
kernel /boot/vmlinuz-2.6.16-1.2133 ro root=LABEL=/ rhgb quiet noht
initrd /boot/initrd-2.6.16-1.2133.img
Summary
This chapter explained what to look for when using Red Hat Enterprise Linux on 64-bit
and multi-core systems as well as systems with Hyper-Threading Technology. Install Red
Hat Enterprise Linux on these systems as you would for any other system. For the 64-bit
system, be sure to install the 64-bit version of the operating system. For a multi-core
system, the number of processor cores is detected, and the appropriate kernel is installed.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: