Thursday, August 13, 2009

Bc as cpu benchmark

My previous post (http://tuxshell.blogspot.com/2009/08/shell-as-calculator.html) was about making math calculation in shell. I showed how to calculate PI number up to n digits. I thought, together with time command it can be used as CPU benchmark. This kind of calculation is cpu intensive and takes some time. Let's calculate up to 5000 digits after period. We measure the time of doing it with time command and look for real value:

$ time echo "scale=5000; a(1)*4" | bc -l

My computer did it within 37.194s. How about yours?

81 comments:

  1. 28.815 desktop
    51.846 VDS #1
    steel thinking - VDS #2
    .. .. .. .. 3m 54.913

    ReplyDelete
  2. 0m22.988s on an Intel i7 980X with 24GB RAM. Thank you for the command :)

    ReplyDelete
    Replies
    1. I got
      real 0m20.358s
      user 0m20.280s
      sys 0m0.015s
      On Cygwin, on an i5-3470, 4GB RAM... Your i7 isn't so efficient!

      Delete
  3. real 0m29.903s
    user 0m29.802s
    sys 0m0.008s

    ReplyDelete
  4. real 0m25.828s
    user 0m25.802s
    sys 0m0.000s

    on a Intel Core I7 960 @ 3.20GHz with 8GB RAM

    Thanks for your little fine Blog! :-)

    ReplyDelete
  5. real 0m27.185s
    user 0m27.050s
    sys 0m0.030s

    AMD Phenom II x6 1090T @ 3.8GHz with 16GB RAM

    ReplyDelete
  6. Also, I'm using Cygwin.

    ReplyDelete
  7. 1m6.63s real 1m4.71s user 0m1.75s system

    Virtual Private Host with bsdvm.com

    ReplyDelete
  8. real 0m38.241s
    user 0m38.145s
    sys 0m0.012s

    A VM on the virtualized server farm that I admin for my employer.

    ReplyDelete
  9. This is fun!

    real 0m37.697s
    user 0m37.225s
    sys 0m0.025s

    My 13" Macbook Pro (2010 model)

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. real 0m28.961s
    user 0m28.880s
    sys 0m0.000s

    The workstation in my office.

    Same specs as Olver Rigger, but always running a Windows 7 VM in Virtual Box.

    ReplyDelete
  12. real 3m11.271s
    user 3m11.190s
    sys 0m0.060s

    elitter.net (a popular free shell account provider)

    ReplyDelete
  13. real 0m26.886s
    user 0m26.858s
    sys 0m0.000s

    Proc : Intel Pentium E6700@3.20Ghz
    RAM : Corsair 8Gb DDR3 1333MHz C9
    Mobo : Gigabyte G41MT-D3V

    ReplyDelete
  14. real 0m32.230s
    user 0m30.794s
    sys 0m0.076s

    Intel(R) Core(TM) i5 CPU 760 @ 2.80GHz

    using cygwin
    nice post !

    ReplyDelete
  15. thanx for positive feedback. As as I can see this post is useful I'm thinking of doing benchmark site where you can submit your results and compare them.

    ReplyDelete
  16. Phenom II X4 B97 3.2 GHz Desktop
    real 0m27.932s
    user 0m27.927s
    sys 0m0.003s

    Ancient Compaq Proliant Server (P3 933Mhz)
    real 2m49.613s
    user 2m22.425s
    sys 0m0.131s

    ReplyDelete
  17. i7 2600k @ 8gb
    eal 0m20.217s
    user 0m20.153s
    sys 0m0.004s

    ReplyDelete
  18. real 0m0.004s
    user 0m0.002s
    sys 0m0.001s

    Kernel and CPU Linux 2.6.18-308.4.1.el5 on x86_64
    Processor information AMD Opteron(tm) Processor 6128, 1 cores

    ReplyDelete
  19. real 0m40.218s
    user 0m40.203s
    sys 0m0.004s

    AMD Athlon 3700+ San Diego @ 2.4Ghz
    Ubuntu Server 12.4 x86_64 fresh

    ReplyDelete
  20. On new intel 3570k with 8g,
    real 0m17.312s
    user 0m17.261s
    sys 0m0.000s

    On 2010 macbook air(core 2) with 2g,
    real 0m45.300s
    user 0m44.948s
    sys 0m0.072s

    ReplyDelete
  21. real 1m26.448s
    user 1m15.408s
    sys 0m2.600s

    Chicago VPS 1g ram, unknown CPU

    ReplyDelete
  22. real 1m37.860s
    user 1m37.561s
    sys 0m0.026s

    amazon EC2 T1 micro intance

    ReplyDelete
  23. real 1m47.450s
    user 1m47.323s
    sys 0m0.024s

    intel D945GCLF2 Debian6

    ReplyDelete
  24. 2.3ghz i7qm (mbp retina)

    echo "scale=5000; a(1)*4" 0,00s user 0,00s system 33% cpu 0,002 total
    bc -l 22,28s user 0,03s system 99% cpu 22,310 total

    ReplyDelete
  25. This comment has been removed by the author.

    ReplyDelete
  26. Raspberry Pi rev1 with Raspbian 10/2012
    @default clock
    real 4m4.706s
    user 4m4.190s
    sys 0m0.030s

    @800Mhz - modest overclock
    real 3m34.050s
    user 3m33.210s
    sys 0m0.100s

    @1000 Turbo mode, with overvoltage
    real 2m52.454s
    user 2m52.090s
    sys 0m0.030s

    ReplyDelete
  27. real 0m19.474s
    user 0m19.401s
    sys 0m0.004s

    ReplyDelete
  28. real 0m17.873s
    user 0m17.869s
    sys 0m0.002s

    i7 3770, SSD, 32gb DDR3

    ReplyDelete
  29. real 0m47.668s
    user 0m40.666s
    sys 0m0.132s

    OpenVZ VPS, 2gb ram, (4x)Intel Xeon @ 2.13GHz

    ReplyDelete
  30. real 0m57.394s
    user 0m56.768s
    sys 0m0.267s

    Prescott Celeron D 2.66GHz 1Gb ram

    ReplyDelete
  31. real 1m28.667s
    user 1m28.282s
    sys 0m0.020s

    Intel Atom 230/D425 2GB Ram. France.

    ReplyDelete
  32. real 1m49.973s
    user 1m49.922s
    sys 0m0.011s

    3.2.29-smp #2 SMP Mon Sep 17 13:16:43 CDT 2012 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux with 512 Mb Ram

    Slackware Linux 14

    ReplyDelete
  33. Raspberry Pi 2m38.994s

    Pi Settings:
    force_turbo=1
    arm_freq=1100
    core_freq=550
    sdram_freq=550
    h264_freq=275
    isp_freq=275
    v3d_freq=275
    over_voltage=8

    Oh, and I have a heatsink on the CPU and Ethernet chip.

    ReplyDelete
  34. real 0m23.420s
    user 0m23.409s
    sys 0m0.000s

    AMD FX 8350 Black Edition 4.0GHz

    ReplyDelete
  35. real 0m40.267s
    user 0m40.223s
    sys 0m0.004s

    Sun w2100z (2 Opteron 252 CPUs & 8Gb of memory)

    ReplyDelete
  36. real 0m41.981s
    user 0m41.938s
    sys 0m0.023s

    On Mac Mini (early 2009), Core 2 Duo CPU @2Ghz

    ReplyDelete
  37. real 1m16.045s
    user 1m14.889s
    sys 0m0.056s

    Dell Inspiron 600M, Pentium M @ 1.6Ghz

    ReplyDelete
  38. real 1m39.149s
    user 1m27.949s
    sys 0m0.068s

    Lenovo Z61m, Intel Core 2 T7200 @ 2Ghz

    ReplyDelete
  39. real 0m32.646s
    user 0m32.502s
    sys 0m0.076s

    Lenovo T60p, Intel Core 2 T7600 @ 2.33Ghz

    ReplyDelete
  40. real 1m37.714s
    user 1m32.146s
    sys 0m0.088s

    IBM Thinkpad T40, Pentium M @ 1.3Ghz

    ReplyDelete
  41. real 0m25.691s
    user 0m25.662s
    sys 0m0.004s
    debian in vmware i7-2670QM @ 2.20Ghz


    Raspberrypi
    no overclock 700Mhz
    real 4m3.415s
    user 4m2.870s
    sys 0m0.050s

    medium overclock 900Mhz
    real 3m10.001s
    user 3m9.540s
    sys 0m0.080s

    turbo overclock ~1Ghz
    real 2m48.570s
    user 2m48.350s
    sys 0m0.010s

    ReplyDelete
  42. real 0m44.760s
    user 0m44.548s
    sys 0m0.019s

    APU A6 Cuad core 1.6Ghz

    ReplyDelete
  43. real 0m23.723s
    user 0m23.719s
    sys 0m0.001s

    ProLiant DL380p Gen8
    12 cores
    CPU E5-2667 0 @ 2.90GHz

    2.6.32-358.6.1.el6.x86_64

    ReplyDelete
  44. core i5 540m (Ist generation) -rated 2.5Ghz

    real 0m37.112s
    user 0m37.000s
    sys 0m0.030s

    ReplyDelete
  45. 79 sec on an old ec2 small 37 on a newish ec2 large, 39 on the lowest tier VPS by cloud at cost and 24 on my mac

    I would add a > /dev/null at the end, and -p to time, but otherwise this is so far quite useful, thanks :)

    For those who are interested, http://www.commandlinefu.com/commands/view/229/quick-integer-cpu-benchmark offers a integer math version, though the results seems pretty much similar (relatively among my hosts)

    ReplyDelete
  46. I7 3770K 16G memory
    mine did it in
    real 0m18.749s
    user 0m18.730s
    sys 0m0.000s

    ReplyDelete
  47. Intel Pentium 4 2.40 GHz, 1 GB RAM
    Debian 7 Wheezy

    real 0m55.629s
    user 0m55.387s
    sys 0m0.004s

    ReplyDelete
  48. http://ark.intel.com/tr/products/75122/Intel-Core-i7-4770-Processor-8M-Cache-up-to-3_90-GHz?q=4770

    real 0m14.984s
    user 0m14.912s
    sys 0m0.008s

    ReplyDelete
  49. Raspberry Pi (Model B)

    real 7m56.865s
    user 4m7.420s
    sys 0m0.250s

    ReplyDelete
  50. Contabo.com VPS

    real 0m34.009s
    user 0m28.207s
    sys 0m2.564s

    ReplyDelete
  51. UG007 - SOC Rockchip RK3066 running debian armv7l

    real 1m33.007s
    user 1m32.530s
    sys 0m0.000s

    I am suprised here as it outperforms IBM Thinkpad T40, Pentium M @ 1.3Ghz !!!

    ReplyDelete
  52. Raspberry Pi2 Model B (Quad Core, 1 GB Ram)

    real 2m37.350s
    user 2m37.220s
    sys 0m0.010s

    ReplyDelete
  53. 14.18s user 0.03s system 99% cpu 14.222 total

    ReplyDelete
  54. real 0m23.614s
    user 0m23.516s
    sys 0m0.017s

    I achieved this with a dual core AMD chip < £50. 4.2 Ghz.

    ReplyDelete
  55. Dell laptop with Intel i7-4600 @ 2.10 GHz.
    real 0m18.057s
    user 0m18.042s
    sys 0m0.009s

    PowerMac G4, Motorola 7400 @ 450 MHz
    real 6m13.960s
    user 5m11.220s
    sys 0m0.060s


    ReplyDelete
  56. Celeron N2930 @ 1.83GHz
    ASUS X200MA Netbook

    real 0m47.237s
    user 0m47.273s
    sys 0m0.000s

    After recompiling bc with
    CFLAGS="-O3 -mtune=native -march=native" ./configure --prefix=/usr

    real 0m44.578s
    user 0m44.607s
    sys 0m0.000s

    ReplyDelete
  57. Xeon X5675 ( 3.06Ghz ): 0m22.572s
    i7 4770k ( 3.5Ghz ): 0m14.813s

    ReplyDelete
  58. Raspberry Pi 2, Raspbian

    real 2m12.296s
    user 2m8.140s
    sys 0m0.020s


    ReplyDelete
  59. Raspberry Pi 3, Raspbian-lite
    1GB 4-core 1.2GHz ARM-Cortex A53

    real 1m21.118s
    user 1m21.060s
    sys 0m0.010s

    ReplyDelete
  60. This is just a single thread task.

    ReplyDelete
  61. NTC Chip 9$ computer:

    real 1m57.089s
    user 1m54.740s
    sys 0m0.040s

    ReplyDelete
  62. real 0m16.338s
    user 0m16.296s
    sys 0m0.000s

    on Intel Xeon CPU E3-1226 v3 @ 3.30GHz

    real 0m16.647s
    user 0m16.640s
    sys 0m0.000s

    on Intel Xeon CPU E5-2687W v3 @ 3.10GHz

    This is of course single core, my second cpu (the E5) has 8 cores, vs the 4 of the other one.

    ReplyDelete
  63. This comment has been removed by a blog administrator.

    ReplyDelete
  64. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
    Mcgutscheine | startlr | salud limpia

    ReplyDelete
  65. This comment has been removed by a blog administrator.

    ReplyDelete
  66. 1m8.702s on 1.65 Ghz power5 9117-570 IBM 128G ram 16 core

    ReplyDelete
  67. real 0m16.427s
    user 0m16.416s
    sys 0m0.000s
    Ryzen 7 1700 overclocked to 3.7 ghz.

    What's with all the spam?

    ReplyDelete
  68. Great blog!!! It was very impressed to me. I like so much and keep sharing. Thank you.

    Education
    Technology

    ReplyDelete
  69. real 0m13.803s
    user 0m13.801s
    sys 0m0.004s

    Intel Core i7-7700

    ReplyDelete
  70. real 0m11.736s
    user 0m11.735s
    sys 0m0.002s

    Intel Core i9-9900k @ 5Ghz

    ReplyDelete
  71. real 0m17.167s
    user 0m17.162s
    sys 0m0.005s

    Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz

    ReplyDelete
  72. The website is looking bit flashy and it catches the visitors eyes. Design is pretty simple and a good user friendly interface. cryptomining equipment

    ReplyDelete