Monday 6 June 2022

CentOS 4 on PCem Pentium 75 - System Information

CentOS 4.0 GNOME desktop on a PCem Pentium 133

CentOS

CentOS was a freely available version of Red Hat Enterprise Linux (RHEL), which followed the upstream RHEL updates and removed any non-free IP from the packages.

Red Hat developed a commercial Linux in the form of Red Hat Linux (also known as Red Hat Commercial Linux), which developed a stable long term support distribution in the form of Red Hat Enterprise Linux (RHEL), which includes components not covered by free licenses. To provide a community Linux which wasn't constrained by enterprise concerns, the Red Hat Linux line was replaced with Fedora Linux. Fedora Linux provides a Red Hat style distribution nearer the bleeding edge than RHEL and isn't encumbered by non-free licenses. This change meant that many users were faced with a decision... to switch to Fedora and cope with the more dynamic nature of the project, or pay for RHEL to get long term stability.

Since RHEL was based on opensource, a number of projects sprung up that took the free parts of RHEL, removed any branding or other encumbered property, and repackaged them into new distributions (see Red Hat Enterprise Linux derivatives - Wikipedia). CentOS was one of these projects and provided an RHEL compatible distribution that lagged a little bit behind RHEL release and updates, and was freely available. While CentOS has since been acquired by Red Hat, and its role (as CentOS Stream) has changed to being upstream of RHEL, we're going to be looking at a version from not long after Red Hat Linux was discontinued.

CentOS 4

RHEL 4 was released on 15-Feb-2005 and was based on Fedora Core 3 (8-Nov-2004). With the corresponding CentOS 4 being released a little later on 9-Mar-2005. Based on the Linux 2.6 kernel (see Introducing the 2.6 Kernel | Linux Journal), this was a jump from previous RHEL and CentOS releases which had used the Linux 2.4 kernel.

Older CentOS releases are available for download from: https://wiki.centos.org/Download.

PCem

The IBM PC and compatibles emulator PCem supports a range of PC system, from the original Intel 8088 based IBM PC through to a early 2000s slot 1 based Pentium II system. This includes a couple of systems featuring the Intel 430fx chipset which makes them equivalent to our reference physical system (tilia).

So our target emulated hardware is:

MainboardIntel Advanced/ZP (Zappa); Intel Triton 82430FX PCIset aka. 430FX
CPUIntel Pentium 75
RAM72 MiB (128 MiB max.)
Floppy3.5" 2.88MB
StorageIDE Controller Intel 82371FB aka. PIIX, ATA-2 16 MB/s
IDE hard disk 2048 GB
ATAPI CD-ROM drive
VideoS3 Trio64 based VGA
Network10Mb/s ethernet ISA

In principle installing CentOS 4 on our sample configuration, should be similar to the process we've used for previous Linux releases:

But there are a couple of problems...

  1. The BIOS for the Intel Advanced/ZP (Zappa) mainboard has limited support for booting from CDs. The BIOS implementation of the El Torito extension (Wikipedia) is limited to floppy emulation, but by CentOS 4 the boot disk image was larger than the 2.88MB available in the largest supported floppy size. So our machine cannot boot directly from the CD, and the CentOS distribution doesn't provide means to create boot floppies.
  2. For the CentOS 4.8 release PCem doesn't like the install kernel. Playing around with other socket 5 and socket 7 mainboards finds that, while they can boot from the CD, a kernel panic occurs when the kernel loads. Trying with the original CentOS 4.0 release ISOs works. So it appears that support for older platforms got broken somewhere in the CentOS updates between 4.0 (2005) and 4.8 (2009), support changes are also evidenced by a specific 'i586' installation kernel in 4.8 (this is probably intended to target the VIA C3 'Samuel 2' and VIA C3 'Ezra' processors which are i586 class with additional features).

So to install we are going to have to use an alternative PCem machine and the CentOS 4.0 release CDs.

Looking at the available PCem systems (see sarah-walker-pcem/pcem: PCem), it looks like the ASUS P/I-P55T2P4 socket 7 board is going to be the best choice (support for 512MB RAM means more disk cache to speed up installation). For installation I used a faster Pentium 133 processor rather than the Pentium 75, and the Realtek RTL8092AS based NE2000 PCI Ethernet card.

A workstation CentOS 4 installation is quite a bit bigger than the old Red Hat Linux releases, so the hard drive is 8,192MB rather than 2,048MB.

With the installation in place, I downgraded the emulated hardware to better match our reference system: swapping the mainboard back to the Intel Advanced/ZP, the processor back to the Intel Pentium 75, and reduced the memory to 72 MiB. To avoid dealing in IRQs and I/O addresses I kept the PCI Ethernet card, which would be more in keeping with systems running CentOS anyway.

System Information - CentOS 4.0

So what does CentOS 4.0 for x86 say about this system...

uname & lsb_release

Operating system release information:

$ uname -a
Linux p-centos4 2.6.9-5.0.3.EL #1 Sat Feb 19 15:32:50 CST 2005 i586 i586 i386 GNU/Linux

A "Linux" kernel, on a node named "p-centos4", kernel release "2.6.9-5.0.3.EL", version "#1 Sat Feb 19 15:32:50 CST 2005", on a "i586" machine, processor "i586", "i386" platform, for operating system "GNU/Linux"

Distribution information from Linux Standard Base (LSB):

$ lsb_release -a
LSB Version:	1.3
Distributor ID:	CentOS
Description:	CentOS release 4.0 (Final)
Release:	4.0
Codename:	Final

And from the distribution release files:

$ cat /etc/redhat-release
CentOS release 4.0 (Final)

So CentOS 4.0 (Final) as expected.

/proc/cpuinfo

Processor information:

$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 5
model		: 2
model name	: Pentium 75 - 200
stepping	: 4
cpu MHz		: 75.121
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: yes
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme pse tsc msr cx8
bogomips	: 146.94

The CPUID information is consistent with this being a second generation Intel Pentium processor (P54C), which is expected. The BogoMips result is consistent with the approximately double clock speed rating expected with this kernel and processor (75.0 * 1.99 = 149.25). See linux - What do the flags in /proc/cpuinfo mean? - Unix & Linux Stack Exchange for details of the CPU flags.

/proc/meminfo

Memory information:

$ cat /proc/meminfo
MemTotal:        69484 kB
MemFree:         12668 kB
Buffers:          7108 kB
Cached:          29024 kB
SwapCached:          0 kB
Active:          27316 kB
Inactive:        16784 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        69484 kB
LowFree:         12668 kB
SwapTotal:      524280 kB
SwapFree:       524280 kB
Dirty:              40 kB
Writeback:           0 kB
Mapped:          14212 kB
Slab:            10252 kB
Committed_AS:    48332 kB
PageTables:        880 kB
VmallocTotal:   950264 kB
VmallocUsed:      1260 kB
VmallocChunk:   948476 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     4096 kB

So 72 MiB RAM, with about 524 MB of swap.

lspci, /proc/bus/pci/devices & /proc/pci

PCI device report:

$ /sbin/lspci
00:00.0 Host bridge: Intel Corp. 430FX - 82437FX TSC [Triton I]
00:07.0 ISA bridge: Intel Corp. 82371FB PIIX ISA [Triton I]
00:07.1 IDE interface: Intel Corp. 82371FB PIIX IDE [Triton I]
00:0d.0 VGA compatible controller: S3 Inc. 86c764/765 [Trio32/64/64V+]
00:0e.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8029(AS)

The machine readable /proc/bus/pci/devices:

$ cat /proc/bus/pci/devices
0000	8086122d	0	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	
0038	8086122e	0	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	PIIX_IDE
0039	80861230	0	00000000	00000000	00000000	00000000	0000ffa1	00000000	00000000	00000000	00000000	00000000	00000000	00000010	00000000	00000000	PIIX_IDE
0068	53338811	b	ff000000	00000000	00000000	00000000	00000000	00000000	00000000	00800000	00000000	00000000	00000000	00000000	00000000	00010000	
0070	10ec8029	a	0000ff81	00000000	00000000	00000000	00000000	00000000	00000000	00000020	00000000	00000000	00000000	00000000	00000000	00000000	ne2k-pci

And the obsolete /proc/pci, which was how to get PCI in older kernels:

$ cat /proc/pci
PCI devices found:
  Bus  0, device   0, function  0:
    Class 0600: PCI device 8086:122d (rev 0).
      Master Capable.  Latency=66.  
  Bus  0, device   7, function  0:
    Class 0601: PCI device 8086:122e (rev 0).
  Bus  0, device   7, function  1:
    Class 0101: PCI device 8086:1230 (rev 0).
      Master Capable.  Latency=66.  
      I/O at 0xffa0 [0xffaf].
  Bus  0, device  13, function  0:
    Class 0300: PCI device 5333:8811 (rev 0).
      IRQ 11.
      Non-prefetchable 32 bit memory at 0xff000000 [0xff7fffff].
  Bus  0, device  14, function  0:
    Class 0200: PCI device 10ec:8029 (rev 0).
      IRQ 10.
      I/O at 0xff80 [0xff9f].

In each case we get details of the same devices, but presented differently. Showing the PCI network card, the mainboard chipset and the graphics card.

dmesg

System log:

$ dmesg
Linux version 2.6.9-5.0.3.EL (buildcentos@build4-1386) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 Sat Feb 19 15:32:50 CST 2005
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 0000000000100000 - 0000000004800000 (usable)
 BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
72MB LOWMEM available.
zapping low mappings.
On node 0 totalpages: 18432
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 14336 pages, LIFO batch:3
  HighMem zone: 0 pages, LIFO batch:1
DMI not present.
ACPI: Unable to locate RSDP
Built 1 zonelists
Kernel command line: ro root=/dev/VolGroup00/LogVol00 rhgb quiet
Initializing CPU#0
CPU 0 irqstacks, hard=c03d2000 soft=c03d1000
PID hash table entries: 1024 (order: 10, 16384 bytes)
Detected 75.121 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 68292k/73728k available (2050k kernel code, 4952k reserved, 656k data, 140k init, 0k highmem)
Calibrating delay loop... 146.94 BogoMIPS (lpj=73472)
Security Scaffold v1.0.0 initialized
SELinux:  Initializing.
SELinux:  Starting in permissive mode
There is already a security framework initialized, register_security failed.
selinux_register_security:  Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 0000013b 00000000 00000000 00000000
CPU: After vendor identify, caps:  0000013b 00000000 00000000 00000000
Intel Pentium with F0 0F bug - workaround enabled.
CPU: After all inits, caps:        0000013b 00000000 00000000 00000000
CPU: Intel Pentium 75 - 200 stepping 04
Checking 'hlt' instruction... OK.
checking if image is initramfs... it is
Freeing initrd memory: 952k freed
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xfca21, last bus=0
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040816
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
apm: BIOS version 1.1 Flags 0x03 (Driver version 1.16ac)
audit: initializing netlink socket (disabled)
audit(1653852375.509:0): initialized
Total HugeTLB memory allocated, 0
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
SELinux:  Registering netfilter hooks
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
- Added public key 63D7AF8AA6573983
- User ID: CentOS-4 (Kernel Module GPG key)
Limiting direct PCI/PCI transfers.
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
vesafb: probe of vesafb0 failed with error -6
Real Time Clock Driver v1.12
Linux agpgart interface v0.100 (c) Dave Jones
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing enabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
divert: not allocating divert_blk for non-ethernet device lo
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIXa: IDE controller at PCI slot 0000:00:07.0
PIIXa: chipset revision 0
PIIXa: bad irq (0): will probe later
PIIXa: neither IDE port enabled (BIOS)
PIIXb: IDE controller at PCI slot 0000:00:07.1
PIIXb: chipset revision 0
PIIXb: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:pio, hdd:pio
Probing IDE interface ide0...
hda: PCemHD, ATA DISK drive
Using cfq io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: PCemCD, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide2...
ide2: Wait for ready failed before probe !
Probing IDE interface ide3...
ide3: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
hda: max request size: 128KiB
hda: 16777152 sectors (8589 MB) w/256KiB Cache, CHS=16644/16/63
hda: cache flushes not supported
 hda: hda1 hda2
hdc: ATAPI 24X CD-ROM drive, 0kB Cache, DMA
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard on isa0060/serio0
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
NET: Registered protocol family 2
IP: routing cache hash table of 128 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 2340)
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Freeing unused kernel memory: 140k freed
device-mapper: 4.1.0-ioctl (2003-12-10) initialised: dm@uk.sistina.com
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
SELinux:  Disabled at runtime.
SELinux:  Unregistering netfilter hooks
inserting floppy driver for 2.6.9-5.0.3.EL
Floppy drive(s): fd0 is 2.88M
FDC 0 is a post-1991 82077
ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
  http://www.scyld.com/network/ne2k-pci.html
divert: allocating divert_blk for eth0
eth0: RealTek RTL-8029 found at 0xff80, IRQ 10, AC:DE:48:88:BB:AA.
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
EXT3 FS on dm-0, internal journal
kjournald starting.  Commit interval 5 seconds
EXT3 FS on hda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 524280k swap on /dev/VolGroup00/LogVol01.  Priority:-1 extents:1
parport0: PC-style at 0x3bc [PCSPP]
ip_tables: (C) 2000-2002 Netfilter core team
ip_tables: (C) 2000-2002 Netfilter core team
parport0: PC-style at 0x3bc [PCSPP]
lp0: using parport0 (polling).
lp0: console ready
NET: Registered protocol family 10
Disabled Privacy Extensions on device c03660a0(lo)
IPv6 over IPv4 tunneling driver
divert: not allocating divert_blk for non-ethernet device sit0
eth0: no IPv6 routers present

Here we see the results of hardware detection and initialization.

Benchmark

Since we have some information from an equivalent physical system (tilia), let's see how well the emulated system matches up let's run some benchmarks...

BogoMips

The BogoMips (Wikipedia) pseudo-benchmark has a behavior where the score is related to the processor clock speed, and has an easily available collection of results from a range of systems (see BogoMips mini-Howto and our BogoMips Results).

PCem system: Linux 2.6.9, CentOS 4.0 for x86:

Calibrating delay loop... 146.94 BogoMIPS (lpj=73472)

Referring to the results of the physical system and the PCem emulated system:

LinuxtiliaPCem
DistributionKernelBogoMipsBogoMips
Slackware Linux 3.0Linux 1.2.1329.8074.98
RedHat Linux 5.2 (Apollo)Linux 2.0.3629.8074.75
RedHat Linux 6.2 (Zoot)Linux 2.2.1429.8074.75
Mandrake Linux 7.2 (Odyssey)Linux 2.2.17148.68149.50
RedHat Linux 7.3 (Valhalla)Linux 2.4.18148.68149.50

The result for our CentOS 4.0 installation, using a Linux 2.6.9 kernel, is around the expected value for the Intel Pentium 75 processor of approx. 150.0 (75.12 * 1.99 = 149.49). And is in rough agreement with the results from Mandrake Linux 7.2 and RedHat Linux 7.3, although it is a little lower than those results. The BogoMips line in the dmesg output now reports the "loops_per_jiffy" (lpj) value, which may indicate calibration against a timer rather than the system clock.

OpenSSL

The OpenSSL library of cryptographic methods provides a means to test the performance of the methods. Using this we can get a feel for the computational performance of a system, and comparisons with real hardware and other emulations can show how well a particular emulation performs. Since we are mainly interested in old hardware, we'll test using two of the older methods: MD5 and RSA.

Note: old versions of OpenSSL are not recommended for actual use. If you want to run comparisons like this, and thus need to use an old release, see the OpenSSL site for back to 0.9.6, for even older releases back to 0.9.1 see http://ftp.mirrorservice.org/sites/ftp.wiretapped.net/pub/security/cryptography/libraries/ssl/openssl/.

CentOS 4.0 for x86, with packaged OpenSSL 0.9.7a

$ openssl version
OpenSSL 0.9.7a Feb 19 2003

Let's seen how MD5 and RSA do:

$ openssl speed md5 rsa
Doing md5 for 3s on 16 size blocks: 65690 md5's in 2.99s
Doing md5 for 3s on 64 size blocks: 55470 md5's in 2.99s
Doing md5 for 3s on 256 size blocks: 37108 md5's in 2.99s
Doing md5 for 3s on 1024 size blocks: 15940 md5's in 3.00s
Doing md5 for 3s on 8192 size blocks: 2520 md5's in 2.99s
Doing 512 bit private rsa's for 10s: 227 512 bit private RSA's in 10.00s
Doing 512 bit public rsa's for 10s: 2297 512 bit public RSA's in 9.98s
Doing 1024 bit private rsa's for 10s: 39 1024 bit private RSA's in 10.07s
Doing 1024 bit public rsa's for 10s: 698 1024 bit public RSA's in 10.00s
Doing 2048 bit private rsa's for 10s: 6 2048 bit private RSA's in 10.18s
Doing 2048 bit public rsa's for 10s: 198 2048 bit public RSA's in 10.02s
Doing 4096 bit private rsa's for 10s: 1 4096 bit private RSA's in 11.80s
Doing 4096 bit public rsa's for 10s: 55 4096 bit public RSA's in 10.14s
OpenSSL 0.9.7a Feb 19 2003
built on: Tue Feb 22 18:03:53 GMT 2005
options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) 
compiler: gcc -fPIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -DOPENSSL_NO_ASM -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_EC -I/usr/kerberos/include -DL_ENDIAN -DTERMIO -Wall -O2 -pipe -m32 -march=i586 -Wa,--noexecstack
available timing options: TIMES TIMEB HZ=100 [sysconf value]
timing function used: times
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5                351.52k     1187.32k     3177.14k     5440.85k     6904.29k
                  sign    verify    sign/s verify/s
rsa  512 bits   0.0441s   0.0043s     22.7    230.2
rsa 1024 bits   0.2582s   0.0143s      3.9     69.8
rsa 2048 bits   1.6967s   0.0506s      0.6     19.8
rsa 4096 bits  11.8000s   0.1844s      0.1      5.4

Extracting the relevant figures for comparisons (see OpenSSL Speed Results):

  • OpenSSL speed MD5 8,192 bytes: 6,904.29k
  • OpenSSL speed RSA 4,096 bytes sign/s: 0.1
  • OpenSSL speed RSA 4,096 bytes verify/s: 5.4

So how does this compare to our results from the reference hardware: tilia?

OpenSSL results from tilia:

OSOpenSSL
Version
MD5
8,192 bytes
RSA
4,096 bytes
sign/s
RSA
4,096 bytes
verify/s
Linux 2.0.36
RedHat Linux 5.2
x86
0.9.2b
22 Mar 1999
12,391.77k0.211.2
Linux 2.2.14
RedHat Linux 6.2
x86
0.9.5a
1 Apr 2000
12,454.57k0.211.1
Linux 2.2.17
Mandrake Linux 7.2
x86
0.9.5a
1 Apr 2000
12,208.81k0.210.8
Linux 2.4.18
RedHat Linux 7.3
x86
0.9.6b [engine]
9 Jul 2001
6,075.73k0.14.5

Note that the OpenSSL binaries used for RedHat Linux 5.2 and 6.2 have been compiled from source and used i486 optimizations. The Mandrake Linux 7.2 supplied OpenSSL is targeted at i586 (Pentium class) processors. The RedHat Linux 7.3 OpenSSL binaries are from the distribution supplied package which was built with the assembler implementations disabled and targeting i386 systems with i686 tuned code. The CentOS 4.0 OpenSSL binaries are from the distribution supplied package which was built with the assembler implementations disabled and targeting i586 systems (-march=i586).

CentOS 4.0 supplied OpenSSL gives results similar to those seen with the RedHat Linux 7.3 OpenSSL, showing the effect of having the assembler implementations disabled, and the difference between the i586 and i686 optimizations.

For reference, a full run of all the methods provided by the system OpenSSL 0.9.7a on this PCem system gives results (openssl speed):

OpenSSL 0.9.7a Feb 19 2003
built on: Tue Feb 22 18:03:53 GMT 2005
options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) blowfish(idx) 
compiler: gcc -fPIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -DOPENSSL_NO_ASM -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_EC -I/usr/kerberos/include -DL_ENDIAN -DTERMIO -Wall -O2 -pipe -m32 -march=i586 -Wa,--noexecstack
available timing options: TIMES TIMEB HZ=100 [sysconf value]
timing function used: times
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md2                 57.61k      123.91k      175.00k      194.22k      201.40k
mdc2                 0.00         0.00         0.00         0.00         0.00 
md4                437.40k     1560.51k     4548.67k     8677.38k    11812.86k
md5                351.64k     1186.37k     3169.26k     5453.57k     6884.01k
hmac(md5)          202.17k      729.92k     2234.62k     4634.03k     6695.59k
sha1               329.79k      944.41k     2022.40k     2837.40k     3211.26k
rmd160             284.59k      808.43k     1693.18k     2340.86k     2649.39k
rc4               2864.26k     3075.25k     3141.27k     3143.34k     3153.92k
des cbc            639.06k      664.77k      673.13k      673.45k      674.47k
des ede3           240.31k      244.10k      245.73k      245.42k      245.76k
idea cbc             0.00         0.00         0.00         0.00         0.00 
rc2 cbc            592.30k      616.24k      620.37k      621.23k      624.67k
rc5-32/12 cbc        0.00         0.00         0.00         0.00         0.00 
blowfish cbc      1259.54k     1364.69k     1393.15k     1405.86k     1406.29k
cast cbc           934.22k      993.95k     1006.68k     1013.73k     1013.08k
aes-128 cbc        940.44k      976.17k      987.53k      987.48k      991.81k
aes-192 cbc        819.97k      844.86k      854.90k      853.33k      857.43k
aes-256 cbc        726.62k      745.37k      750.17k      754.81k      753.66k
                  sign    verify    sign/s verify/s
rsa  512 bits   0.0441s   0.0043s     22.7    229.9
rsa 1024 bits   0.2579s   0.0143s      3.9     69.8
rsa 2048 bits   1.6967s   0.0506s      0.6     19.8
rsa 4096 bits  11.8000s   0.1842s      0.1      5.4
                  sign    verify    sign/s verify/s
dsa  512 bits   0.0412s   0.0500s     24.3     20.0
dsa 1024 bits   0.1381s   0.1680s      7.2      6.0
dsa 2048 bits   0.4886s   0.6118s      2.0      1.6

Checking against the performance of a locally compiled OpenSSL 0.9.7a using the default options, which uses the assembler code and targets i386 with i586 tuning (-mcpu=pentium), on the PCem system gives:

OpenSSL 0.9.7a Feb 19 2003
built on: Sun May 29 20:53:12 BST 2022
options:bn(64,32) md2(int) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) idea(int) blowfish(idx) 
compiler: gcc -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -mcpu=pentium -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
available timing options: TIMES TIMEB HZ=100 [sysconf value]
timing function used: times
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md2                 63.11k      137.65k      195.98k      218.45k      226.65k
mdc2               155.51k      175.74k      181.98k      183.64k      184.46k
md4                469.10k     1668.67k     4919.30k     9586.22k    13228.16k
md5                409.50k     1469.87k     4413.78k     8853.16k    12559.24k
hmac(md5)          232.31k      875.67k     2919.42k     7051.56k    11993.09k
sha1               384.65k     1206.76k     2901.76k     4479.32k     5339.87k
rmd160             346.78k     1043.09k     2345.39k     3412.65k     3943.08k
rc4               7219.54k     8454.81k     8861.45k     8940.89k     8959.32k
des cbc           1236.12k     1276.05k     1289.39k     1295.93k     1294.34k
des ede3           445.05k      451.80k      454.55k      454.31k      454.51k
idea cbc           550.69k      563.58k      568.25k      567.98k      567.98k
rc2 cbc            665.17k      684.18k      687.79k      690.77k      690.86k
rc5-32/12 cbc     4390.95k     4985.15k     5172.48k     5204.65k     5215.57k
blowfish cbc      2888.71k     3135.74k     3199.66k     3219.95k     3222.19k
cast cbc          2479.71k     2668.69k     2706.01k     2721.11k     2734.32k
aes-128 cbc       1113.14k     1141.00k     1144.92k     1149.35k     1145.79k
aes-192 cbc        967.50k      983.74k      991.12k      990.21k      991.23k
aes-256 cbc        851.59k      868.20k      869.97k      870.06k      873.81k
                  sign    verify    sign/s verify/s
rsa  512 bits   0.0266s   0.0026s     37.6    389.4
rsa 1024 bits   0.1384s   0.0076s      7.2    131.6
rsa 2048 bits   0.8592s   0.0257s      1.2     38.9
rsa 4096 bits   5.8500s   0.0924s      0.2     10.8
                  sign    verify    sign/s verify/s
dsa  512 bits   0.0232s   0.0270s     43.1     37.0
dsa 1024 bits   0.0715s   0.0881s     14.0     11.4
dsa 2048 bits   0.2441s   0.2959s      4.1      3.4

Showing the difference the assembler makes. Presumably Red Hat had found compatibility or security issues that led to them disabling this option.

Thoughts

PCem works well for getting a reasonably close match to old hardware, the slight differences in performance are not going to be an issue in most cases.

For Linux kernels from 2.4, virtual machines are generally a better option, since you get the compute performance of the host processor. However earlier kernels can have compatibility problems, so emulation options like PCem have the advantage when dealing with older Linux software.

Further Sources


PCem Pentium 133, CentOS 4.0 - System Information

Since we had to use an alternative specification system to install CentOS 4.0, we had a look at what CentOS had to say about that system too.

So our target emulated hardware is:

MainboardASUS P/I-P55T2P4 (manual), socket 7, Intel 430HX PCIset "Triton II"
CPUIntel Pentium 133
RAM256 MiB (256 MiB max.)
Floppy3.5" 2.88MB
StorageIDE Controller Intel 82371FB aka. PIIX, ATA-2 16 MB/s [should be a PIIX3]
IDE hard disk 8192 GB
ATAPI CD-ROM drive
VideoS3 Trio64 based VGA
Network10/100 Mb/s Ethernet PCI NE2000 compatible, Realtek RTL8092AS

uname & lsb_release

Operating system release information:

$ uname -a
Linux p-centos4 2.6.9-5.0.3.EL #1 Sat Feb 19 15:32:50 CST 2005 i586 i586 i386 GNU/Linux

A "Linux" kernel, on a node named "p-centos4", kernel release "2.6.9-5.0.3.EL", version "#1 Sat Feb 19 15:32:50 CST 2005", on a "i586" machine, processor "i586", "i386" platform, for operating system "GNU/Linux"

Distribution information from Linux Standard Base (LSB):

$ lsb_release -a
LSB Version:	1.3
Distributor ID:	CentOS
Description:	CentOS release 4.0 (Final)
Release:	4.0
Codename:	Final

And from the distribution release files:

$ cat /etc/redhat-release
CentOS release 4.0 (Final)

So CentOS 4.0 (Final) as expected.

/proc/cpuinfo

Processor information:

$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 5
model		: 2
model name	: Pentium 75 - 200
stepping	: 12
cpu MHz		: 133.365
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: yes
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme pse tsc msr cx8
bogomips	: 263.16

So an Intel Pentium running at 133 MHz. The BogoMips result is consistent with the approximately double clock speed rating expected with this kernel and processor (133.365 * 1.99 = 265.40). See linux - What do the flags in /proc/cpuinfo mean? - Unix & Linux Stack Exchange for details of the CPU flags.

/proc/meminfo

Memory information:

$ cat /proc/meminfo
MemTotal:       256112 kB
MemFree:        196912 kB
Buffers:          7208 kB
Cached:          29324 kB
SwapCached:          0 kB
Active:          27604 kB
Inactive:        16900 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       256112 kB
LowFree:        196912 kB
SwapTotal:      524280 kB
SwapFree:       524280 kB
Dirty:               4 kB
Writeback:           0 kB
Mapped:          14216 kB
Slab:            11860 kB
Committed_AS:    44988 kB
PageTables:        848 kB
VmallocTotal:   761848 kB
VmallocUsed:      1260 kB
VmallocChunk:   760060 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     4096 kB

So 256 MiB RAM, with about 524 MB of swap.

lspci, /proc/bus/pci/devices & /proc/pci

PCI device report:

$ /sbin/lspci
00:00.0 Host bridge: Intel Corp. 430HX - 82439HX TXC [Triton II]
00:07.0 ISA bridge: Intel Corp. 82371FB PIIX ISA [Triton I]
00:07.1 IDE interface: Intel Corp. 82371FB PIIX IDE [Triton I]
00:09.0 VGA compatible controller: S3 Inc. 86c764/765 [Trio32/64/64V+]
00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8029(AS)

The machine readable /proc/bus/pci/devices:

$ cat /proc/bus/pci/devices
0000	80861250	0	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	
0038	8086122e	0	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	00000000	PIIX_IDE
0039	80861230	0	00000000	00000000	00000000	00000000	0000e801	00000000	00000000	00000000	00000000	00000000	00000000	00000010	00000000	00000000	PIIX_IDE
0048	53338811	a	10000000	00000000	00000000	00000000	00000000	00000000	00000000	00800000	00000000	00000000	00000000	00000000	00000000	00010000	
0050	10ec8029	b	0000e401	00000000	00000000	00000000	00000000	00000000	00000000	00000020	00000000	00000000	00000000	00000000	00000000	00000000	ne2k-pci

And the obsolete /proc/pci, which was how to get PCI in older kernels:

$ cat /proc/pci
PCI devices found:
  Bus  0, device   0, function  0:
    Class 0600: PCI device 8086:1250 (rev 0).
      Master Capable.  Latency=32.  
  Bus  0, device   7, function  0:
    Class 0601: PCI device 8086:122e (rev 0).
      Master Capable.  Latency=32.  
  Bus  0, device   7, function  1:
    Class 0101: PCI device 8086:1230 (rev 0).
      Master Capable.  Latency=32.  
      I/O at 0xe800 [0xe80f].
  Bus  0, device   9, function  0:
    Class 0300: PCI device 5333:8811 (rev 0).
      IRQ 10.
      Non-prefetchable 32 bit memory at 0x10000000 [0x107fffff].
  Bus  0, device  10, function  0:
    Class 0200: PCI device 10ec:8029 (rev 0).
      IRQ 11.
      I/O at 0xe400 [0xe41f].

In each case we get details of the same devices, but presented differently. Showing the PCI network card, the mainboard chipset and the graphics card.

dmesg

System log:

$ dmesg
Linux version 2.6.9-5.0.3.EL (buildcentos@build4-1386) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 Sat Feb 19 15:32:50 CST 2005
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000010000000 (usable)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
256MB LOWMEM available.
zapping low mappings.
On node 0 totalpages: 65536
  DMA zone: 4096 pages, LIFO batch:1
  Normal zone: 61440 pages, LIFO batch:15
  HighMem zone: 0 pages, LIFO batch:1
DMI 2.0 present.
ACPI: Unable to locate RSDP
Built 1 zonelists
Kernel command line: ro root=/dev/VolGroup00/LogVol00 rhgb quiet
Initializing CPU#0
CPU 0 irqstacks, hard=c03d2000 soft=c03d1000
PID hash table entries: 2048 (order: 11, 32768 bytes)
Detected 133.365 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 254856k/262144k available (2050k kernel code, 6740k reserved, 656k data, 140k init, 0k highmem)
Calibrating delay loop... 263.16 BogoMIPS (lpj=131584)
Security Scaffold v1.0.0 initialized
SELinux:  Initializing.
SELinux:  Starting in permissive mode
There is already a security framework initialized, register_security failed.
selinux_register_security:  Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 0000013b 00000000 00000000 00000000
CPU: After vendor identify, caps:  0000013b 00000000 00000000 00000000
Intel Pentium with F0 0F bug - workaround enabled.
CPU: After all inits, caps:        0000013b 00000000 00000000 00000000
CPU: Intel Pentium 75 - 200 stepping 0c
Checking 'hlt' instruction... OK.
checking if image is initramfs... it is
Freeing initrd memory: 952k freed
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xf0430, last bus=0
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040816
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Using IRQ router PIIX/ICH [8086/122e] at 0000:00:07.0
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
audit: initializing netlink socket (disabled)
audit(1653833497.913:0): initialized
Total HugeTLB memory allocated, 0
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
SELinux:  Registering netfilter hooks
Initializing Cryptographic API
ksign: Installing public key data
Loading keyring
- Added public key 63D7AF8AA6573983
- User ID: CentOS-4 (Kernel Module GPG key)
Limiting direct PCI/PCI transfers.
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
vesafb: probe of vesafb0 failed with error -6
Real Time Clock Driver v1.12
Linux agpgart interface v0.100 (c) Dave Jones
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing enabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
divert: not allocating divert_blk for non-ethernet device lo
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIXa: IDE controller at PCI slot 0000:00:07.0
PIIXa: chipset revision 0
PIIXa: bad irq (0): will probe later
PIIXa: neither IDE port enabled (BIOS)
PIIXb: IDE controller at PCI slot 0000:00:07.1
PIIXb: chipset revision 0
PIIXb: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xe800-0xe807, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xe808-0xe80f, BIOS settings: hdc:DMA, hdd:pio
Probing IDE interface ide0...
hda: PCemHD, ATA DISK drive
Using cfq io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: PCemCD, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide2...
ide2: Wait for ready failed before probe !
Probing IDE interface ide3...
ide3: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
hda: max request size: 128KiB
hda: 16777152 sectors (8589 MB) w/256KiB Cache, CHS=16644/16/63
hda: cache flushes not supported
 hda: hda1 hda2
hdc: ATAPI 24X CD-ROM drive, 0kB Cache, DMA
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard on isa0060/serio0
psmouse.c: Failed to reset mouse on isa0060/serio1
input: ImPS/2 Generic Wheel Mouse on isa0060/serio1
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 4681)
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
Freeing unused kernel memory: 140k freed
device-mapper: 4.1.0-ioctl (2003-12-10) initialised: dm@uk.sistina.com
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
SELinux:  Disabled at runtime.
SELinux:  Unregistering netfilter hooks
inserting floppy driver for 2.6.9-5.0.3.EL
Floppy drive(s): fd0 is 2.88M AMI BIOS
FDC 0 is a post-1991 82077
ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
  http://www.scyld.com/network/ne2k-pci.html
PCI: Found IRQ 11 for device 0000:00:0a.0
divert: allocating divert_blk for eth0
eth0: RealTek RTL-8029 found at 0xe400, IRQ 11, AC:DE:48:88:BB:AA.
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
EXT3 FS on dm-0, internal journal
kjournald starting.  Commit interval 5 seconds
EXT3 FS on hda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 524280k swap on /dev/VolGroup00/LogVol01.  Priority:-1 extents:1
parport0: PC-style at 0x378 [PCSPP,EPP]
ip_tables: (C) 2000-2002 Netfilter core team
ip_tables: (C) 2000-2002 Netfilter core team
parport0: PC-style at 0x378 [PCSPP,EPP]
lp0: using parport0 (polling).
lp0: console ready
NET: Registered protocol family 10
Disabled Privacy Extensions on device c03660a0(lo)
IPv6 over IPv4 tunneling driver
divert: not allocating divert_blk for non-ethernet device sit0
eth0: no IPv6 routers present

Here we see the results of hardware detection and initialization.

PCem Pentium 133, BogoMips

Checking for changes in the BogoMips method/scaling across Linux kernels used in Debian Linux releases. The last release of Debian to support Pentium (i586) was Debian GNU/Linux 5 (lenny), more recent releases for x86 require a i686 class processor.

Recording the BogoMips result reported by the kernel used for Debian Linux 'netinst' CD images on a PCem Pentium 133 system:

Debian ReleaseLinux KernelBogoMips SourceBogoMips Result
1.3
(bo)
2.0.29dmesg
Calibrating delay loop... 133.12 BogoMIPS
2.0
(hamm)
2.0.34dmesg
Calibrating delay loop... 133.12 BogoMIPS
2.1
(slink)
2.0.36dmesg
Calibrating delay loop... 133.12 BogoMIPS
2.2
(potato)
2.2.17dmesg
Calibrating delay loop... 266.24 BogoMIPS
3.0r6
(woody)
2.2.20dmesg
Calibrating delay loop... 266.24 BogoMIPS
3.0r6
(woody)
2.4.18dmesg
Calibrating delay loop... 266.24 BogoMIPS
3.1r8
(sarge)
2.4.27dmesg
Calibrating delay loop... 266.24 BogoMIPS
3.1r8
(sarge)
2.6.8dmesg
Calibrating delay loop... 264.19 BogoMIPS
4.0r9
(etch)
2.6.18dmesg
Calibrating delay using timer specific routine.. 266.98 BogoMIPS (lpj=533966)
5.0.10
(lenny)
2.6.26dmesg
Calibrating delay using timer specific routine.. 267.44 BogoMIPS (lpj=534880)

For PowerPC (see QEMU mac99 BogoMips) we saw two changes in 2.6: one to switch to a timer based calibration, and another to derived the BogoMips score directly from the timer frequency. For x86 it also looks like the 2.6 kernel introduces changes, with late kernels explicitly using a timer instead of the system clock, and the early 2.6 kernel showing a slightly lower BogoMips result than seen with 2.4 kernels.


No comments: