Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2004 12:05:30 -0500
From:      "Juan Tumani" <jtumani55@hotmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3 v/s gcc2.9.5)
Message-ID:  <BAY12-F55UxMOeBhK3a0002e48a@hotmail.com>

next in thread | raw e-mail | index | archive | help
We did some more experiments and when we compiled the object file on 5.2
then linked it on the 4.9 machine and then ran it on the 5.2 machine, there 
was
no cyclical problem seen (Frankenstein run).  Kind of points to the 5.2 link 
stage, i.e.,
5.2 libraries?

Check out the graphical exhibits at 
http://www.employees.org/~rsargent/flops/
The graph at the very bottom shows the Frankenstein run.  The graphs depict 
the
/usr/bin/time results of running 300 iterations of flops 1.2 while 
incrementing the
env one byte between iterations.

I use flops 1.2, it runs less modules than 2.0 but still exhibits the 
cyclical slowness
[alignment] problem as module #2 in flops 2.0.  Source code for flops 1.2 is 
at the bottom
of the above link.

Juan


>From: Alexandr Kovalenko <never@nevermind.kiev.ua>
>To: Wes Peters <wes@softweyr.com>
>CC: Juan Tumani <jtumani55@hotmail.com>, freebsd-hackers@freebsd.org
>Subject: Re: FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3 v/s 
>gcc2.9.5)
>Date: Sat, 14 Feb 2004 10:24:21 +0200
>
>Hello, Wes Peters!
>
>On Tue, Feb 10, 2004 at 11:29:34AM -0800, you wrote:
>
> > On Monday 09 February 2004 13:20, Juan Tumani wrote:
> > > I have an Intel D845GE m/b w/ a P4 1.7 CPU and I have the box setup
> > > to dual boot to either 4.9 or 5.2.  Both OS are right off the latest
> > > posted iso CD image, i.e., no updates, no kernel tweaks, everything
> > > vanilla right out of the box.  I compiled flops.c on both 4.9 and
> > > 5.2 and the 5.2 performance is less than half that of 4.9: 760
> > > MFLOPS on 4.9 v/s 340 MFLOPS on 5.2.
> > >
> > > I tried turning off the SMP and other kernel tweaks and no
> > > improvement in 5.2.  I then downloaded and installed gcc295 on the
> > > 5.2 machine and that fixed the problem.  So now all I have to do is
> > > figure out the gcc 3.3.3 switches to make it run like gcc 2.9.5 or
> > > figure out how to rebuild 5.2 w/ gcc 2.9.5 :-).
> >
> > I'm not sure that kernel tweaks are going to make much difference on a
> > single-threaded floating point benchmark.  Compiler optimizations sure
> > do, though.  (Note: I couldn't find version 1.2 of flops.c, so this is
> > based on version 2.0.)  On a 2.0GHz P4, I see:
> >
> > wpeters@salty> cc -o flops -O -DUNIX flops.c
>
>Could you please explain me this? Result is fully reproduceable. Please 
>note,
>that the only difference is the output file name. Even resulting files 
>match
>bit-to-bit. If I do
>
>mv very-slow-flops flops2
>
>and then run ./flops2, it runs as flops2 - fast.
>
>Machine is Dual 2.8 GHz Xeon with HTT disabled (in BIOS). FreeBSD is 
>5.2.1-RC2.
>
>%fetch http://home.iae.nl/users/mhx/flops.c
>Receiving flops.c (34942 bytes): 100%
>34942 bytes transferred in 0.6 seconds (54.72 kBps)
>%cc -o flops2 -O2 -mcpu=pentium4 -DUNIX flops.c
>flops.c: In function `main':
>flops.c:174: warning: return type of `main' is not `int'
>%cc -o flops-sse-4 -O2 -mcpu=pentium4 -DUNIX flops.c
>flops.c: In function `main':
>flops.c:174: warning: return type of `main' is not `int'
>%cc -o very-slow-flops -O2 -mcpu=pentium4 -DUNIX flops.c
>flops.c: In function `main':
>flops.c:174: warning: return type of `main' is not `int'
>%./flops2
>
>    FLOPS C Program (Double Precision), V2.0 18 Dec 1992
>
>    Module     Error        RunTime      MFLOPS
>                             (usec)
>      1      4.0146e-13      0.0130   1074.8815
>      2     -1.4166e-13      0.0128    545.3338
>      3      4.7184e-14      0.0177    960.4579
>      4     -1.2557e-13      0.0166    903.6914
>      5     -1.3800e-13      0.0317    915.0687
>      6      3.2380e-13      0.0310    936.3149
>      7     -8.4583e-11      0.0403    297.7250
>      8      3.4867e-13      0.0310    968.6112
>
>    Iterations      =  512000000
>    NullTime (usec) =     0.0006
>    MFLOPS(1)       =   635.0698
>    MFLOPS(2)       =   560.4516
>    MFLOPS(3)       =   805.4502
>    MFLOPS(4)       =   945.5219
>
>%./flops-sse-4
>
>    FLOPS C Program (Double Precision), V2.0 18 Dec 1992
>
>    Module     Error        RunTime      MFLOPS
>                             (usec)
>      1      4.0146e-13      0.0177    791.6075
>      2     -1.4166e-13      0.0309    226.7944
>      3      4.7184e-14      0.0202    842.7146
>      4     -1.2557e-13      0.0166    902.8921
>      5     -1.3800e-13      0.0317    916.2631
>      6      3.2380e-13      0.0309    937.0923
>      7     -8.4583e-11      0.0403    297.9173
>      8      3.4867e-13      0.0309    969.3446
>
>    Iterations      =  512000000
>    NullTime (usec) =     0.0006
>    MFLOPS(1)       =   297.9983
>    MFLOPS(2)       =   546.3944
>    MFLOPS(3)       =   775.3701
>    MFLOPS(4)       =   922.1566
>
>%./very-slow-flops
>
>    FLOPS C Program (Double Precision), V2.0 18 Dec 1992
>
>    Module     Error        RunTime      MFLOPS
>                             (usec)
>      1      4.0146e-13      0.0317    442.0039
>      2     -1.4166e-13      0.0331    211.3728
>      3      4.7184e-14      0.0350    485.1899
>      4     -1.2557e-13      0.0168    892.8307
>      5     -1.3800e-13      0.0319    909.7385
>      6      3.2380e-13      0.0311    931.1527
>      7     -8.4583e-11      0.0405    296.4570
>      8      3.4867e-13      0.0312    962.3224
>
>    Iterations      =  512000000
>    NullTime (usec) =     0.0004
>    MFLOPS(1)       =   259.1938
>    MFLOPS(2)       =   492.7930
>    MFLOPS(3)       =   669.1527
>    MFLOPS(4)       =   797.1471
>
>--
>NEVE-RIPE, will build world for food
>Ukrainian FreeBSD User Group
>http://uafug.org.ua/

_________________________________________________________________
Find great local high-speed Internet access value at the MSN High-Speed 
Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY12-F55UxMOeBhK3a0002e48a>