Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 2015 18:14:03 -0500
From:      Erik Moe <e.moe@rcn.com>
To:        freebsd-arm@freebsd.org
Subject:   RPI2 performance comparison using LINPACK
Message-ID:  <1B7FC791-3DEE-4310-8BE0-BBB3C8E34C78@rcn.com>

next in thread | raw e-mail | index | archive | help
I=E2=80=99ve been lurking on this list for a while.   I got interested =
in the discussion about RPI2 performance on FreeBSD and how it compared =
to Linux.  I found this source code for LINPACK and thought it would be =
good for comparison: http://www.netlib.org/benchmark/linpackc.new =
<http://www.netlib.org/benchmark/linpackc.new>.  I built FreeBSD using =
crochet and 11.0-CURRENT.  For my Linux system I used Raspbian, the =
2015-05-05 release.  First for the Linux results, I complied LINPACK =
using =E2=80=9Cgcc -O3 -o linpack linpack.c -lm=E2=80=9D:

Enter array size (q to quit) [200]: =20
Memory required:  315K.


LINPACK benchmark, Double precision.
Machine precision:  15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:

    Reps Time(s) DGEFA   DGESL  OVERHEAD    KFLOPS
----------------------------------------------------
      64   0.84  90.48%   3.57%   5.95%  111257.384
     128   1.69  90.53%   1.78%   7.69%  112683.761
     256   3.38  90.24%   2.66%   7.10%  111966.030
     512   6.76  95.27%   1.78%   2.96%  107186.992
    1024  13.52  90.31%   2.81%   6.88%  111699.232

Then I ran the same on FreeBSD, using the same options: "cc -O3 -o =
linpack linpack.c -lm=E2=80=9D:

Enter array size (q to quit) [200]: =20
Memory required:  315K.


LINPACK benchmark, Double precision.
Machine precision:  15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:

    Reps Time(s) DGEFA   DGESL  OVERHEAD    KFLOPS
----------------------------------------------------
       8   0.70  92.22%   3.33%   4.44%  16352.248
      16   1.41  92.78%   2.22%   5.00%  16447.875
      32   2.79  92.16%   3.08%   4.76%  16544.627
      64   5.59  92.03%   2.80%   5.17%  16593.432
     128  11.18  91.75%   2.87%   5.38%  16617.942

Then I recompiled LINPACK for FreeBSD using =E2=80=9Ccc -O3 -o linpack =
linpack.c -lm -mfloat-abi=3Dsoftfp=E2=80=9D:

Enter array size (q to quit) [200]: =20
Memory required:  315K.


LINPACK benchmark, Double precision.
Machine precision:  15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:

    Reps Time(s) DGEFA   DGESL  OVERHEAD    KFLOPS
----------------------------------------------------
      32   0.60  87.01%   0.00%  12.99%  83957.811
      64   1.21  86.45%   4.52%   9.03%  79789.693
     128   2.43  89.71%   2.57%   7.72%  78399.628
     256   4.85  90.82%   2.74%   6.44%  77455.055
     512   9.71  89.86%   3.14%   7.00%  77857.070
    1024  19.48  90.53%   3.13%   6.34%  77090.170

Then finally I enabled powerd on FreeBSD  and ran LINPACK with the same =
compile options, =E2=80=9Ccc -O3 -o linpack linpack.c -lm =
-mfloat-abi=3Dsoftfp=E2=80=9D:

Enter array size (q to quit) [200]: =20
Memory required:  315K.


LINPACK benchmark, Double precision.
Machine precision:  15 digits.
Array size 200 X 200.
Average rolled and unrolled performance:

    Reps Time(s) DGEFA   DGESL  OVERHEAD    KFLOPS
----------------------------------------------------
      64   0.81  95.19%   1.92%   2.88%  111389.571
     128   1.62  89.37%   4.83%   5.80%  115388.171
     256   3.23  91.06%   2.42%   6.52%  116282.653
     512   6.47  89.86%   3.02%   7.13%  117038.717
    1024  12.97  90.54%   3.31%   6.14%  115536.294


The FreeBSD results were very similar to Linux as long as it was =
compiled with "-mfloat-abi=3Dsoftfp=E2=80=9D and the cpu is running at =
the full 900Mhz.  I tried to compile the Linux version of LINPACK using =
"-mfloat-abi=3Dsoft=E2=80=9D, but got the error "linpack uses VFP =
register arguments, /tmp/cc24nslQ.o does not=E2=80=9D, so I assume that =
it doesn=E2=80=99t support a soft floating-point implementation.  =
FreeBSD must default to "-mfloat-abi=3Dsoft=E2=80=9D.  Raspbian must =
default to "-mfloat-abi=3Dhard=E2=80=9D because that=E2=80=99s the only =
option that would work neither "-mfloat-abi=3Dsoft=E2=80=9D or =
-mfloat-abi=3Dsoftfp=E2=80=9D would link.  Will hard float work for =
FreeBSD if I compile with "TARGET_ARCH=3Darmv6hf=E2=80=9D?

Erik




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1B7FC791-3DEE-4310-8BE0-BBB3C8E34C78>