The Quintessential Linux Benchmark
Some device drivers in the Linux kernel need timing delays. Either they need a very short delay, or the delay must be very accurately determined. A simple non-busy loop cannot do this. Therefore, Linus Torvalds added a calibration in the boot procedure to predetermine how often a specific busy-loop algorithm can be calculated in one second. This predetermined value, called loops_per_second, is used in the device drivers to delay for precisely measured times.
For fun, Linus also added a print statement presenting this predetermined value (divided by 500,000) as BogoMips. Linus apparently loves it when millions of Linux users are gazing at their computer, baffled by these bogus MIPS. Note that BogoMips have nothing to do with the million instructions per second that the name suggests; that is why they are bogus.
The only serious reason for paying attention to the BogoMips presented on booting Linux is to see whether it is in the proper range for the particular processor, its clock frequency, and the potentially present cache. 486 systems are especially prone to faulty setups of RAM caching, turbo-buttons, and such things.
People continuously ask on Usenet: “I have an XYZ CPU running at clock MHz. How many BogoMips should it do?” The answer can be calculated from the following table:
Intel/AMD 386SX clock * 0.14 (± 0.01) Intel/AMD 386DX clock * 0.18 (± 0.01) Cyrix/IBM 486 clock * 0.33 (± 0.04) Intel/AMD 486 clock * 0.50 (± 0.01) Pentium clock * 0.40 (± 0.01) 680x0 (insufficient data) PowerPC clock * 0.77 (± 0.02) Mips (insufficient data) Alpha clock * 0.99 (± 0.01)
From the above calculation we see several important points. First of all, the Intel and AMD 486 CPUs are not showing the same BogoMips as Cyrix and IBM 486 CPUs. This does not mean that they have a different perceived performance; it just means that they process the busy-loop algorithm differently.
The table also shows that the Pentium processor doesn't have the expected extrapolated multiplication factor. This is due to the fact that the specific busy-loop algorithm is not optimized for the parallelism of the Pentium processor.
The BogoMips calculations for the Motorola, PowerPC, Mips, and Alpha processors are similar to the Intel type processors calculations. Because the non-busy loop algorithm is coded in Assembler, however, they cannot be identical. It clearly shows that comparison of BogoMips between CPUs is really bogus, even between two different Intel type CPUs.
Last but not least, you see an allowed variation in the multiplication factor of about 0.01. The BogoMips calculation loop is “quantizised” (Linus's term), so it is likely that you will get exactly the same number all the time. Yet, if the speed is just on the edge, small variations, such as different lengths for interrupts, will cause your machine's BogoMips to vary.
“When I boot Linux I get the message:
Calibrating delay loop.. ok - 23.96 BogoMips failed
Where or why has the calibration delay loop failed?”
The obvious answer is that 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 may not be in the machine. The point is that just after calculating the BogoMips, all device drivers are initialized: first the SCSI devices, then Net devices, etc. Any failure in these initializations is duly reported. The AHA152x drive is noted for such failures. Other effects of failing drivers (and not of failing BogoMips calculations) are systems crashes, long waits, and complete system lock-ups.
Since Linux 1.2, many error messages have improved, so upgrade to at least that version to find out which particular driver is failing.
For people without Linux systems, or for those people who do not want to reboot their system time and again, a stand-alone program for calculating BogoMips is available in the standard archives (e.g., on sunsite.unc.edu in /pub/Linux/system/Status/bogo-1.2.tar.gz). On Linux, by default, it runs the same code that is used in the Linux kernel while booting, but runs as a user program. Note that due to system load, values calculated with the stand-alone program may be lower than expected for the CPU you are running, and lower than reported during boot. For the non-Linux systems, a portable C version is available that may run on any system that supports an ANSI C compiler and library.
- Free Today: September Issue of Linux Journal (Retail value: $5.99)
- The Tiny Internet Project, Part I
- Bitcoin on Amazon! Sort of...
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Android Browser Security--What You Haven't Been Told
- Returning Values from Bash Functions
- Nativ Disc
- Epiq Solutions' Sidekiq M.2
- Securing the Programmer
Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.Get the Guide