Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
BogoMips
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Unscientific measurement of CPU speed made by the Linux kernel}} '''BogoMips''' (from "bogus" and [[million instructions per second|MIPS]]) is a crude measurement of [[CPU speed]] made by the [[Linux kernel]] when it boots to calibrate an internal [[busy-loop]].<ref name='lj'>{{cite journal | first = Wim | last = Van Dorst | journal = Linux Journal | title = The Quintessential Linux Benchmark |date=January 1996 | url = http://www.linuxjournal.com/article/1120 | access-date = 2008-08-22}}</ref> An often-quoted definition of the term is "the number of million times per second a processor can do absolutely nothing".<ref name=quote>[[Eric S Raymond]], and [[Geoff Mackenzie]], published on the [[Internet]] in the early 1990s, untraceable origin.</ref><ref name=esr>{{cite web | url = http://www.catb.org/jargon/html/B/BogoMIPS.html | first = Eric S. | last = Raymond | author-link = Eric S Raymond | title = Hackers Jargon File}}</ref> BogoMips is a value that can be used to verify whether the processor in question is in the proper range of similar processors, i.e. BogoMips represents a processor's clock frequency as well as the potentially present [[CPU cache]]. It is not usable for performance comparisons among different CPUs.<ref name=howto>{{cite web | first = Wim | last = Van Dorst | url = http://www.clifton.nl/bogomips.html | title = BogoMips Mini-Howto | edition = V38 | date = 2 March 2006 | access-date = 2008-08-22}}</ref> == History == In 1993, Lars Wirzenius posted a [[Usenet]] message<ref>{{cite web|last=Wirzenius|first=Lars|title=Re: printing & BogoMips|url=https://groups.google.com/group/comp.os.linux/browse_thread/thread/589fc4eaa432f8b6/ea0df3ceaa8f129a?hl=fr&q=MIPS+is+short+for+Millions+of+Instructions#ea0df3ceaa8f129a}}</ref> explaining the reasons for its introduction in the Linux kernel on comp.os.linux: : [...] : MIPS is short for Millions of Instructions Per Second. It is a measure for the computation speed of a processor. 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 Torvalds|Linus]]'s own invention. The linux kernel version 0.99.11 (dated 11 July 1993) needed 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 boot-up is that a) it is slightly useful for debugging and for checking that the computer[β]s caches and [[turbo button]] work, and b) Linus loves to chuckle when he sees confused people on the news. : [...] == Proper BogoMips ratings == As a very approximate guide, the BogoMips can be pre-calculated by the following table. The given rating is typical for that [[Central processing unit|CPU]] with the then current and applicable [[Linux]] version. The index is the ratio of "BogoMips per clock speed" for any CPU to the same for an Intel 386DX CPU, for comparison purposes.<ref>{{cite web|last=Bekman|first=Stas|title=What is a BogoMip?|url=http://stason.org/TULARC/os/linux-faq/019-What-is-a-BogoMip.html}}</ref><ref name="BogoMips HOWTO">{{cite web|url=http://tldp.org/HOWTO/BogoMips/bogo-list.html|title=BogoMips mini-Howto}}</ref> {| class="sortable wikitable" !System!!Rating!!Index |- |[[Intel 8088]] ||clock Γ 0.004||0.02 |- |[[Intel 80386|Intel/AMD 386SX]] ||clock Γ 0.14||0.8 |- |[[Intel 80386|Intel/AMD 386DX]] ||clock Γ 0.18||1 (definition) |- |[[Motorola 68030]]||clock Γ 0.25||1.4 |- |[[Cyrix]]/[[IBM]] 486||clock Γ 0.34||1.8 |- |Intel [[Intel P5|Pentium]]||clock Γ 0.40||2.2 |- |[[Intel 80486|Intel 486]] ||clock Γ 0.50||2.8 |- |[[AMD 5x86]]||clock Γ 0.50||2.8 |- |[[MIPS Technologies|MIPS]] R4000/R4400||clock Γ 0.50||2.8 |- |[[ARM9]]||clock Γ 0.50||2.8 |- |[[Motorola 68040]]||clock Γ 0.67||3.7 |- |[[PowerPC]] 603||clock Γ 0.67||3.7 |- |Intel [[StrongARM]]||clock Γ 0.66||3.7 |- |[[NexGen]] Nx586||clock Γ 0.75||4.2 |- |[[PowerPC]] 601||clock Γ 0.84||4.7 |- |[[Alpha 21064]]/21064A||clock Γ 0.99||5.5 |- |[[Alpha 21064|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 Cx5x86|Cyrix 5x86]]/[[Cyrix 6x86|6x86]] ||clock Γ 1.00||5.6 |- |Intel [[Pentium II]]/[[Pentium III|III]]||clock Γ 1.00||5.6 |- |[[Athlon|AMD K7/Athlon]]||clock Γ 1.00||5.6 |- |Intel [[Celeron]]||clock Γ 1.00||5.6 |- |Intel [[Itanium]]||clock Γ 1.00||5.6 |- |[[R4600]]||clock Γ 1.00||5.6 |- |[[Hitachi, Ltd.|Hitachi]] SH-4||clock Γ 1.00||5.6 |- |[[Raspberry Pi|Raspberry Pi (Model B)]]||clock Γ 1.00||5.6 |- |Intel [[Itanium 2]]||clock Γ 1.49||8.3 |- |[[Alpha 21264]]||clock Γ 1.99||11.1 |- |[[VIA Technologies|VIA Centaur]]||clock Γ 1.99||11.1 |- |[[AMD K6|AMD K5/K6/K6-2/K6-III]]||clock Γ 2.00||11.1 |- |AMD [[Duron]]/[[Athlon]] XP||clock Γ 2.00||11.1 |- |AMD [[Sempron]]||clock Γ 2.00||11.1 |- |[[SPARC|UltraSparc]] II||clock Γ 2.00||11.1 |- |Intel [[Pentium MMX]]||clock Γ 2.00||11.1 |- |Intel [[Pentium 4]]||clock Γ 2.00||11.1 |- |Intel [[Pentium M]]||clock Γ 2.00||11.1 |- |Intel [[Core Duo]]||clock Γ 2.00||11.1 |- |Intel [[Core 2 Duo]]||clock Γ 2.00||11.1 |- |Intel [[Intel Atom|Atom]] N455||clock Γ 2.00||11.1 |- |Centaur C6-2||clock Γ 2.00||11.1 |- |[[PowerPC]] 604/604e/750||clock Γ 2.00||11.1 |- |Intel [[Pentium III#Coppermine|Pentium III Coppermine]]||clock Γ 2.00||11.1 |- |Intel [[Xeon#Pentium III Xeon|Pentium III Xeon]]||clock Γ 2.00||11.1 |- |[[Motorola 68060]]||clock Γ 2.00||11.1 |- |Intel [[Xeon#Xeon .28DP.29 .26 Xeon MP .2832-bit.29|Xeon MP (32-bit)]] ([[hyper-threading]])||clock Γ 3.97||22.1 |- |Rockchip 3588||||48.0 |} With the 2.2.14 Linux kernel, a [[CPU cache|caching]] setting of the CPU state was moved from behind to before the BogoMips calculation. Although the BogoMips algorithm itself wasn't changed, from that kernel onward the BogoMips rating for then current Pentium CPUs was twice that of the rating before the change. The changed BogoMips outcome had no effect on real processor performance.{{Citation needed|reason=Performance claim with no evidence|date=January 2020}} In a shell, BogoMips can be easily obtained by searching the [[Procfs#cpuinfo|cpuinfo]] file:<ref name="BogoMips HOWTO"/> <syntaxhighlight lang="console"> $ grep -i bogomips /proc/cpuinfo </syntaxhighlight> == Computation of BogoMips == With kernel 2.6.x, BogoMips are implemented in the <code>/usr/src/linux/init/calibrate.c</code> kernel source file. It computes the Linux kernel timing parameter <code>loops_per_jiffy</code> (see [[jiffy (time)|jiffy]]) value. The explanation from source code: <pre><nowiki> /* * A simple loop like * while ( jiffies < start_jiffies+1) * start = read_current_timer(); * will not do. As we don't really know whether jiffy switch * happened first or timer_value was read first. And some asynchronous * event can happen between these two events introducing errors in lpj. * * So, we do * 1. pre_start <- When we are sure that jiffy switch hasn't happened * 2. check jiffy switch * 3. start <- timer value before or after jiffy switch * 4. post_start <- When we are sure that jiffy switch has happened * * Note, we don't know anything about order of 2 and 3. * Now, by looking at post_start and pre_start difference, we can * check whether any asynchronous event happened or not */ </nowiki></pre> <code>loops_per_jiffy</code> is used to implement <code>udelay</code> (delay in microseconds) and <code>ndelay</code> (delay in nanoseconds) functions. These functions are needed by some drivers to wait for hardware. Note that a [[busy waiting]] technique is used, so the kernel is effectively blocked when executing <code>ndelay</code>/<code>udelay</code> functions. For i386 architecture <code>delay_loop</code> is implemented in <code>/usr/src/linux/arch/i386/lib/delay.c</code> as: <syntaxhighlight lang="c"> /* simple loop based delay: */ static void delay_loop(unsigned long loops) { int d0; __asm__ __volatile__( "\tjmp 1f\n" ".align 16\n" "1:\tjmp 2f\n" ".align 16\n" "2:\tdecl %0\n\tjns 2b" :"=&a" (d0) :"0" (loops)); } </syntaxhighlight> equivalent to the following assembler code <syntaxhighlight lang="asm"> ; input: eax = d0 ; output: eax = 0 jmp start .align 16 start: jmp body .align 16 body: decl eax jns body </syntaxhighlight> which can be rewritten to C-pseudocode <syntaxhighlight lang="c"> static void delay_loop(long loops) { long d0 = loops; do { --d0; } while (d0 >= 0); } </syntaxhighlight> Full and complete information and details about BogoMips, and hundreds of reference entries can be found in the (outdated) BogoMips mini-Howto.<ref name=howto/> == Timer-based delays == In 2012, [[ARM Holdings|ARM]] contributed a new <code>udelay</code> implementation allowing the system timer built into many ARMv7 CPUs to be used instead of a busy-wait loop. This implementation was released in Version 3.6 of the [[Linux kernel]].<ref>{{cite web|title=ARM: 7452/1: delay: allow timer-based delay implementation to be selected|last=Deacon|first=Will|url=https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d0a533b18235d36206b9b422efadb7cee444dfdb}}</ref> Timer-based delays are more robust on systems that use [[Dynamic frequency scaling|frequency scaling]] to dynamically adjust the processor's speed at runtime, as <code>loops_per_jiffies</code> values may not necessarily scale linearly. Also, since the timer frequency is known in advance, no calibration is needed at boot time. One side effect of this change is that the BogoMIPS value will reflect the timer frequency, not the CPU's core frequency. Typically the timer frequency is much lower than the processor's maximum frequency, and some users may be surprised to see an unusually low BogoMIPS value when comparing against systems that use traditional busy-wait loops. == See also == * [[Turbo button]] * [[Instructions per second]] ==References== {{Reflist}} == External links == * [http://www.clifton.nl/bogomips.html BogoMips Mini-Howto, V38] * [https://github.com/vitalyvch/Bogo/tree/BogoMIPS_v1.3 Sources of classical standalone benchmark] {{Benchmark}} [[Category:Linux kernel]] [[Category:Benchmarks (computing)]]
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Benchmark
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Search
Search
Editing
BogoMips
Add topic