Several authors have contributed to my knowledge of BogoMips. In this place, I would like to thank them highly.
>From Lars Wirzenius' wirzeniu@kruuna.Helsinki.FI
mail
of 9 September 1993, explaining Bogomips, with additional
detailed information by Alessandro Rubini, rubini@norgana.systemy.it
,
and by Wim van Dorst:
`MIPS is short for Millions of Instructions Per Second. It is a measure for the computation speed of a program. Like most such measures, it is more often abused than used properly (it is very difficult to justly compare MIPS for different kinds of computers).BogoMips are Linus's invention. The kernel (or was it a device driver?) needs a timing loop (the time is too short and/or needs to be too exact for a non-busy-loop method of waiting), which must be calibrated to the processor speed of the machine. Hence, the kernel measures at boot time how fast a certain kind of busy loop runs on a computer. "Bogo" comes from "bogus", i.e, something which is a fake. Hence, the BogoMips value gives some indication of the processor speed, but it is way too unscientific to be called anything but BogoMips.
The reasons (there are two) it is printed during bootup is that a) it is slightly useful for debugging and for checking that the computers caches and turbo button work, and b) Linus loves to chuckle when he sees confused people on the news.'
BogoMips are being determined in /usr/src/linux/init/main.c
(simple C algorithm), and the pertaining kernel
variable loops_per_sec
is used in several drivers for more
serious purpose. The actual delay function udelay()
is in
assembler, and therefore each port has its own definition in
/include/asm/delay.h
. The loops_per_sec
variable
and the udelay()
function are used in numerous drivers,
see:
cd /usr/src/linux #or where else source is located find . -name '*.[hcS]' -exec fgrep loops_per_sec {} /dev/null \; find . -name '*.[hcS]' -exec fgrep udelay {} /dev/null \;
>From a initiative by Ian Jackson, ijackson@nyx.cs.du.edu
, and
Przemek Klosowski, much updated and expanded by Wim van Dorst for
current data, as listed below:
As a very approximate guide, the BogoMips can be calculated by:
System BogoMips Comparison Intel 8088 clock * 0.004 0.02 Intel/AMD 386SX clock * 0.14 0.8 Intel/AMD 386DX clock * 0.18 1 (definition) Motorola 68030 clock * 0.25 1.4 Cyrix/IBM 486 clock * 0.34 1.8 Intel Pentium clock * 0.40 2.2 Intel 486 clock * 0.50 2.8 AMD 5x86 clock * 0.50 2.8 Mips R4000/R4400 clock * 0.50 2.8 Nexgen Nx586 clock * 0.75 4.2 PowerPC 601 clock * 0.84 4.7 Alpha 21064/21064A clock * 0.99 5.5 Alpha 21066/21066A clock * 0.99 5.5 Alpha 21164/21164A clock * 0.99 5.5 Intel Pentium Pro clock * 0.99 5.5 Cyrix 5x86/6x86 clock * 1.00 5.6 Intel Pentium II/III clock * 1.00 5.6 Intel Celeron clock * 1.00 5.6 Mips R4600 clock * 1.00 5.6 Alpha 21264 clock * 1.99 11.1 AMD K5/K6/K6-2/K6-III clock * 2.00 11.1 UltraSparc II clock * 2.00 11.1 Pentium MMX clock * 2.00 11.1 PowerPC 604 clock * 2.00 11.1 Motorola 68060 clock * 2.01 11.2 Motorola 68040 not enough data (yet) AMD Athlon not enough data (yet) IBM S390 not enough data (yet)
Note that the BogoMips calculation loop does not take full advantage of the parallelism of various processors, such as the Intel Pentium and the Alpha 21164.
Note that the BogoMips calculation loop for the non-Intel CPUs is similar but not the same.
There are three methods to determing the current BogoMips, viz.
/proc/cpuinfo
, e.g., with
`cat /proc/cpuinfo`
. This method is highly
preferred above the alternatives.A non-determinative alternative, which is also applicable for non-Linux
systems such as Crays and so, may be the standalone BogoMips
program. From the readme file by Jeff Tranter, jeff_tranter@mitel.com
:
`Tired of rebooting your system so you can see how many BogoMIPS it's running at today? [...] "Bogomips" is a standalone program that displays your system performance using one of the world's most recognized benchmarks. It uses the same code that is used in the Linux kernel while booting, but runs as a user program. [...] Version 1.3 of BogoMIPs is now portable and should run on any system that supports an ANSI C compiler and library.'
Note that due to system load values calculated with the standalone program on Linux systems may be lower than registered in the list below. Intrinsically the standalone cannot give precisely similar information to the boot sequence BogoMips, since system load will compete with this program run by an ordinary user. Therefore only boot sequence BogoMips ratings are listed below.
Be aware that the file
sunsite.unc.edu:/pub/Linux/system/status/bogo-1.2.tar.gz/
contains the latest version 1.3 (sic), which is yet rather outdated.
Nonetheless, due to its good portability, it should compile and run
on nearly every system with a C compiler.
>From Linus Torvalds, torvalds@cc.helsinki.fi
, explaining about the
variation one may see in the BogoMips rating, in c.o.l.development,
at 28 April 1994
`The BogoMips calculation loop is "quantizised", so you're most likely to get the exact same number all the time. You usually will get different numbers only if the speed is just on the "edge", when small variations (different time for interrupt ticks etc) will make it jump from one value to the other.'
If a kernel is not compiled specifically for the pertaining CPU, also some (even large) variations of the BogoMips ratings can occur, mainly due to erroneous alignment. This problem apparently only occurs on the various x86 CPUs (Intel and clones). Fortunately it can easily be solved: recompile the kernel specifically for your CPU.
Note that the BogoMips algorithm, contrarily to popular believe, did NOT change significantly over the various kernel versions.
Suggested by various questions on the net and private mail,
e.g., by Lily, lbliao@alumni.caltech.edu
, and by Pierre Frenkiel,
frenkiel@cdfap2.in2p3.fr
. In March 1995 they asked:
`When I boot Linux I get the message:Calibrating delay loop.. ok - 23.96 BogoMips failedWhere/why has the calibration delay loop failed?'
It didn't fail. If it had failed the text would have been
Calibrating delay loop.. failed
What likely did fail was a driver for some gadget which you may not have in your machine. Just after calculating the BogoMips rating all device drivers are initiated. First the SCSI devices, then Net devices, etc. Any failure is duly reported. Noteworthy is the AHA152x driver. Other effects of failing drivers (and not of failing BogoMips calculations) are systems crashes, long waits, and complete system locks, somewhere close to (just before or just after) outputting the ok - xx.xx BogoMips text.
Since Linux 1.2 many error messages have improved, so upgrade to at least that version to find out which particular driver it is that is failing. Also recompile the kernel to only include the drivers that are actually needed for your hardware configuration.
Cyrix 486-like CPUs need cache enabling software, sometimes referred to as BogoBoost software. Cyrix 5x86 and 6x86 CPUs may have their BogoMips improved drastically by branch-prediction (BIOS option). Note that the performance improvement may be marginal. There are several packages available for adjusting Cyrix CPUs, such as the bogoboost patch, cx5x86mod, and set6x86, all from the normal archives, in obvious places. It is reported the Cyrix 6x86 CPUs may give better performance when the kernel is compiled with 486-optimization, instead Pentium-optimization.
NexGen 386-enhanced CPUs, marked as Nx586, are listed as 386-like, since the fact that they are performing like Pentium machines is not relevant to BogoMips.
AMD 5x86, also denoted as AMD 486DX5, are quadrupled 486/33 machines. They are fully in line with other 486 CPUs. The AMD K5 and the K6 are Pentium-like CPUs, with their own BogoMips multipliers.
Let me add that there are only two reasons for paying attention to the BogoMips rating that is presented on booting Linux:
Note that more serious uses for real benchmarking are addressed in the Linux Benchmarking Howto by André D. Balsa.