Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Why is our Alpha box so slow?
@ 1998-08-01  4:00 Christian Weisgerber
  1998-08-01  4:00 ` Paul Tomblin
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Christian Weisgerber @ 1998-08-01  4:00 UTC (permalink / raw)


We have an old Alpha box which isn't used all that much because its most
remarkable quality is its slowness. According to the invoice, the
hardware is:

Board:          Digital AXPpci33
CPU:            Alpha 21066A, 233MHz
L2 cache:       1M  (1M max)
Memory:         64M (256M max)
SCSI:           on-board NCR 53C810

I've seen some vague estimates on the web that this box should be about
as fast as a Pentium-120. It doesn't come close.

Notably compiling is extremely slow. Now, this isn't of course really
comparable between platforms but I'd say this Alpha isn't much faster
than my AM386/40 at home and much, much slower than my i586/100.
And no, according to vmstat the Alpha isn't swapping.

- Can anybody recommend any simple real-world benchmarks to figure out
  how fast/slow the system actually is?

- Is there anything obvious that could be wrong or misconfigured with
  that box?

I'm not familiar with Alpha boxes. Is there something like a BIOS that
could be misconfigured? Or some jumpers that are set wrong on the board?
I can't believe that an Alpha is *that* slow. Fractional clock speed?
Disabled L2 cache? Unnecessarily slow memory access? What's going on
here?


(For the Siegen guys: I'm talking about gnocchi.unix-ag.uni-kl.de.)
-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    100+ SF Book Reviews: <URL:http://home.pages.de/~naddy/reviews/>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-01  4:00 Why is our Alpha box so slow? Christian Weisgerber
@ 1998-08-01  4:00 ` Paul Tomblin
  1998-08-01  4:00 ` B. James Phillippe
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 22+ messages in thread
From: Paul Tomblin @ 1998-08-01  4:00 UTC (permalink / raw)


In a previous article, naddy@mips.rhein-neckar.de (Christian Weisgerber) said:
>Memory:         64M (256M max)

>Notably compiling is extremely slow. Now, this isn't of course really

So was mine until I upgraded to 96Mb of RAM.  Is it swapping a lot?


-- 
Paul Tomblin, ptomblin@xcski.com.
"An appointment is an engagement to see someone, while a morningstar is a
large lump of metal used for viciously crushing skulls.  It is important not
to confuse the two, isn't it, Mr. --?" - Terry Pratchett



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-01  4:00 Why is our Alpha box so slow? Christian Weisgerber
  1998-08-01  4:00 ` Paul Tomblin
  1998-08-01  4:00 ` B. James Phillippe
@ 1998-08-01  4:00 ` Greg Lindahl
  1998-08-03  4:00   ` Christian Weisgerber
  1998-08-02  4:00 ` Carlos Vidal
  1998-08-03  4:00 ` Christian Weisgerber
  4 siblings, 1 reply; 22+ messages in thread
From: Greg Lindahl @ 1998-08-01  4:00 UTC (permalink / raw)


naddy@mips.rhein-neckar.de (Christian Weisgerber) writes:

> Notably compiling is extremely slow.

Is the compilation I/O bound or CPU bound? If you don't know enough to
have checked that already, it may be hard for you to understand why
it's slow. You also didn't mention if you were comparing gcc to gcc,
or gcc working on a big, grody program to some Windows compiler
without much of an optimizer.

-- g



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-01  4:00 Why is our Alpha box so slow? Christian Weisgerber
  1998-08-01  4:00 ` Paul Tomblin
@ 1998-08-01  4:00 ` B. James Phillippe
  1998-08-03  4:00   ` Christian Weisgerber
  1998-08-03  4:00   ` Eric Christy
  1998-08-01  4:00 ` Greg Lindahl
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 22+ messages in thread
From: B. James Phillippe @ 1998-08-01  4:00 UTC (permalink / raw)
  To: Christian Weisgerber

On 1 Aug 1998, Christian Weisgerber wrote:

> We have an old Alpha box which isn't used all that much because its most
> remarkable quality is its slowness. According to the invoice, the
> hardware is:
> 
> Board:          Digital AXPpci33
> CPU:            Alpha 21066A, 233MHz
> L2 cache:       1M  (1M max)
> Memory:         64M (256M max)
> SCSI:           on-board NCR 53C810

Your system is quite similar to mine.  Alpha 21064, 233Mhz, 64MB,
NCR53c810.

> I've seen some vague estimates on the web that this box should be about
> as fast as a Pentium-120. It doesn't come close.

I put mine between a Cyrix 6x86 P150+ and an Intel P200.  See my web page
for some benchmarks I performed against this system and several others,
using BYTE's BYTEmark.  You can also download the package there and try it
yourself.  You may need to add -mieee to the compilation of one of the
tests to prevent the SIGFPE.

cheers,
-bp
--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-01  4:00 Why is our Alpha box so slow? Christian Weisgerber
                   ` (2 preceding siblings ...)
  1998-08-01  4:00 ` Greg Lindahl
@ 1998-08-02  4:00 ` Carlos Vidal
  1998-08-03  4:00 ` Christian Weisgerber
  4 siblings, 0 replies; 22+ messages in thread
From: Carlos Vidal @ 1998-08-02  4:00 UTC (permalink / raw)
  To: Christian Weisgerber

Christian Weisgerber wrote:

> We have an old Alpha box which isn't used all that much because its most
> remarkable quality is its slowness. According to the invoice, the
> hardware is:
>
> Board:          Digital AXPpci33
> CPU:            Alpha 21066A, 233MHz
> L2 cache:       1M  (1M max)
> Memory:         64M (256M max)
> SCSI:           on-board NCR 53C810

How are you booting? With MILO? Check if you are actually seeing 64M
(with 'free -t'). Sometimes you have to write in MILO:

    set MEMORY_SIZE 64

in order to see all the memory (the default is 32M).


--
Carlos Vidal
carlos@tarkus.se






^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-01  4:00 ` B. James Phillippe
  1998-08-03  4:00   ` Christian Weisgerber
@ 1998-08-03  4:00   ` Eric Christy
  1 sibling, 0 replies; 22+ messages in thread
From: Eric Christy @ 1998-08-03  4:00 UTC (permalink / raw)


Well, I have looked at these Bytemarks and something seems flakey.
The FPU index seems to be way too low.   Here at the University of
Kentucky physics Dept., a collegue of mine has ported a large Geant
MonteCarlo code from Alpha/DU to Intel/Linux.  This code is heavily
floating point and he did a little comparison between his P2-266 and
my alphastation 200/233.   The alpha ran this code at about 75% the
speed of the P2-266 which seems to be at odds with the Bytemarks.
I'll try to compile the Bytemarks under DU on my alpha for comparison.
Perhaps this is the Alpha/Linux math libraries rearing their ugly heads.

Eric Christy


B. James Phillippe wrote:

> On 1 Aug 1998, Christian Weisgerber wrote:
>
> > We have an old Alpha box which isn't used all that much because its most
> > remarkable quality is its slowness. According to the invoice, the
> > hardware is:
> >
> > Board:          Digital AXPpci33
> > CPU:            Alpha 21066A, 233MHz
> > L2 cache:       1M  (1M max)
> > Memory:         64M (256M max)
> > SCSI:           on-board NCR 53C810
>
> Your system is quite similar to mine.  Alpha 21064, 233Mhz, 64MB,
> NCR53c810.
>
> > I've seen some vague estimates on the web that this box should be about
> > as fast as a Pentium-120. It doesn't come close.
>
> I put mine between a Cyrix 6x86 P150+ and an Intel P200.  See my web page
> for some benchmarks I performed against this system and several others,
> using BYTE's BYTEmark.  You can also download the package there and try it
> yourself.  You may need to add -mieee to the compilation of one of the
> tests to prevent the SIGFPE.
>
> cheers,
> -bp
> --
> B. James Phillippe <bryan@terran.org>
> Linux Software Engineer, WGT Inc.
> http://earth.terran.org/~bryan






^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-01  4:00 ` Greg Lindahl
@ 1998-08-03  4:00   ` Christian Weisgerber
  0 siblings, 0 replies; 22+ messages in thread
From: Christian Weisgerber @ 1998-08-03  4:00 UTC (permalink / raw)


In article <6pvjuo$52s@news1.newsguy.com>, Greg Lindahl
<lindahl@pbm.com> wrote:

> > Notably compiling is extremely slow.
> 
> Is the compilation I/O bound or CPU bound?

How do I tell?

With a compilation running and an otherwise unloaded box, top says >95%
user time, <5% system time, >1% idle time. Looks like CPU bound to me.

> You also didn't mention if you were comparing gcc to gcc, or gcc
> working on a big, grody program to some Windows compiler without much
> of an optimizer.

I don't have any hard figures, that's why I didn't go into any detail,
and besides I don't know whether compiling for an Alpha is at all
comparable with compiling for Intel x86. The Alpha box has egcs-2.90.29.
Various other Linux and BSD Intel boxes around here run various versions
of gcc 2.7 and egcs.

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    carpe librum: books 'n' reviews <URL:http://www.carpe.com/buch/>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-01  4:00 ` B. James Phillippe
@ 1998-08-03  4:00   ` Christian Weisgerber
  1998-08-05  4:00     ` B. James Phillippe
  1998-08-03  4:00   ` Eric Christy
  1 sibling, 1 reply; 22+ messages in thread
From: Christian Weisgerber @ 1998-08-03  4:00 UTC (permalink / raw)


In article <Pine.LNX.3.96.980801154420.15463F-100000@earth.terran.org>,
B. James Phillippe <bryan@terran.org> wrote:

> See my web page for some benchmarks I performed against this system
> and several others, using BYTE's BYTEmark. You can also download the
> package there and try it yourself. You may need to add -mieee to the
> compilation of one of the tests to prevent the SIGFPE.

egcs-2.90.29, -O9 -mieee
       (also  -O3, only nbench1 with -mieee)

gives about 2.0  BYTEmarks integer, 0.50 BYTEmarks float.

I haven't really looked at what these tests do, though. They don't come
with any documentation. :-(

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    carpe librum: books 'n' reviews <URL:http://www.carpe.com/buch/>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-01  4:00 Why is our Alpha box so slow? Christian Weisgerber
                   ` (3 preceding siblings ...)
  1998-08-02  4:00 ` Carlos Vidal
@ 1998-08-03  4:00 ` Christian Weisgerber
  1998-08-04  4:00   ` Linus Torvalds
                     ` (4 more replies)
  4 siblings, 5 replies; 22+ messages in thread
From: Christian Weisgerber @ 1998-08-03  4:00 UTC (permalink / raw)


Some further details:

Today I checked the hardware. The CPU clock is jumpered correctly to
233MHz. There are eleven -1024-20 cache RAMs and the cache speed jumper
is set to the 20ns position. Looks okay to me.

The box boots with MILO. It was originally shipped with a console for NT
but the flash ROM has since been overwritten with MILO.

I'm told the machine needs about 2..3h to compile a kernel. I haven't
yet managed to build one, so I haven't verified this value.

I have written a very simple program in an attempt to evaluate the
memory bandwidth of the machine. Yes, it's primitive, but I didn't have
a proper benchmark at hand. (Any pointers?) Basically all it does is run
through <size> bytes of memory in a *p++ +=1 loop for 15s and count
iterations. You'd expect that if <size> fits into the cache, there'll be
more iterations.

On my Pentium-100, 256k PB cache (FreeBSD 2.2.7, gcc 2.7.2.1, -O3), I
get the expected result:

   1k:    185500888     *
   2k:    185921817     *  8k 1st level cache
   4k:    186118297     *
   8k:    184412946     *
  16k:    158454103     .
  32k:    158543035     .
  64k:    158442354     .  256k 2nd level cache
 128k:    158063623     .
 256k:    157281569     .
 512k:    123673105
1024k:    123498417        main memory
2048k:    123463409
4096k:    123659481

The result on the Alpha box (Red Hat 5.1, 2.0.33, egcs-2.90.29, -O3) is
bizarre:

   1k:    149679693     *
   2k:    149316456     *  8k 1st level cache
   4k:    144773425     *
   8k:    144881972     *
  16k:    104659487     .
  32k:    104677115     .
  64k:    104652525     .
 128k:    104110833     .  huh!? we have 1M
 256k:     56204479        of 2nd level cache
 512k:     40814057
1024k:     32698979
2048k:     26571787        continuously getting slower!?
4096k:     24232887


Here's the program, to be run on an unloaded machine.

--------------->
/*
 * test memory bandwidth
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <sys/time.h>

/* MUST be powers of two and multiples of sizeof(int) */
#define MINMEM	1024
#define	MAXMEM	(4096*1024)
#define RUNTIME	15		/* seconds per iteration */
#define WORD	long

char *progname;
int  run;

void handler(int sig)
{
  run = 0;
}

int main(int argc, char *argv[])
{
  long  i, count;
  WORD *buf, *p;
  struct itimerval it;
  
  progname = rindex(argv[0], '/');
  if (progname == NULL)
    progname = argv[0];

  buf = malloc(MAXMEM);
  if (buf == NULL) {
    fprintf(stderr, "%s: can't allocate memory.\n", progname);
    exit(1);
  }

  setvbuf(stdout, (char *)NULL, _IOLBF, 0);
  it.it_interval.tv_sec = 0;
  it.it_interval.tv_usec = 0;
  it.it_value.tv_sec = RUNTIME;
  it.it_value.tv_usec = 0;
  for (i = MINMEM; i <= MAXMEM; i <<= 1) {
    p = buf;
    run = 1;
    count = 0;
    signal(SIGVTALRM, handler);
    setitimer(ITIMER_VIRTUAL, &it, (struct itimerval *)NULL);
    while(run) {
      *p++ += 1;
      if (p >= buf + i / sizeof(WORD))
	p = buf;
      count++;
    }
    printf("%4ldk: %12ld\n", i/1024, count);
  }

  exit(0);
}
<---------------

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    100+ SF Book Reviews: <URL:http://home.pages.de/~naddy/reviews/>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-03  4:00 ` Christian Weisgerber
  1998-08-04  4:00   ` Linus Torvalds
@ 1998-08-04  4:00   ` Chris Pirih, proverbs at wolfenet dot com
  1998-08-05  4:00     ` David A Willmore
  1998-08-04  4:00   ` Christian Weisgerber
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 22+ messages in thread
From: Chris Pirih, proverbs at wolfenet dot com @ 1998-08-04  4:00 UTC (permalink / raw)


In article <6q55em$a58$1@mips.rhein-neckar.de>,
 naddy@mips.rhein-neckar.de (Christian Weisgerber) wrote:
| The result on the Alpha box (Red Hat 5.1, 2.0.33, egcs-2.90.29, -O3) is
| bizarre:
| 
|    1k:    149679693     *
|    2k:    149316456     *  8k 1st level cache
|    4k:    144773425     *
|    8k:    144881972     *
|   16k:    104659487     .
|   32k:    104677115     .
|   64k:    104652525     .
|  128k:    104110833     .  huh!? we have 1M
|  256k:     56204479        of 2nd level cache
|  512k:     40814057
| 1024k:     32698979
| 2048k:     26571787        continuously getting slower!?
| 4096k:     24232887

My UDB gives similar strange results.  It's supposed to have 256KB cache.

   1k:    162429336
   2k:    161239327
   4k:    153634196
   8k:    152466836  L1
  16k:    115433109
  32k:    115493359
  64k:    115693927
 128k:     54652508
 256k:     33898287  L2
 512k:     24448508
1024k:     21316260
2048k:     21236215
4096k:     21339344

As you can see by the 1024k-4096k numbers, main memory bandwidth SUCKS.
It is on par with my slowest 486 (DX2/66), and about half the speed of 
my fastest 486 (AMD 160).  I thought these things were supposed to have
64 bit memory busses!  Anyway, that's probably why it seems so slow at
normal tasks.

Hmm...  Actually, I just ran the benchmark on my 5x86, and it gives
the same shape curve as the Alphas:

   1k:    159719763
   2k:    159770978
   4k:    159648998
   8k:    159333539
  16k:    153094855  L1
  32k:     88254014
  64k:     88369331
 128k:     88251360
 256k:     71518883
 512k:     61695135  L2
1024k:     53851179
2048k:     51091243
4096k:     50810323

The 5x86 has 512K L2 cache.  I suspect the difference is that the
Pentium has separate L1 caches for instructions and data, whereas
the Alphas and 5x86 have unified L1 cache.  We're seeing some
contention between data and instruction bandwidth.  I'll bet this
also has some effect on real-life performance.

---
chris



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-03  4:00 ` Christian Weisgerber
  1998-08-04  4:00   ` Linus Torvalds
  1998-08-04  4:00   ` Chris Pirih, proverbs at wolfenet dot com
@ 1998-08-04  4:00   ` Christian Weisgerber
  1998-08-06  4:00   ` Alex Rhomberg
  1998-08-06  4:00   ` B. James Phillippe
  4 siblings, 0 replies; 22+ messages in thread
From: Christian Weisgerber @ 1998-08-04  4:00 UTC (permalink / raw)


In article <6q55em$a58$1@mips.rhein-neckar.de>, I wrote:

> I'm told the machine needs about 2..3h to compile a kernel.

This has turned out to be an exaggeration. I finally managed to build
2.0.34 with <URL:http://www.unix-ag.uni-siegen.de/~engel/.config>.
Running in the background, it took ~40min wall-clock time, about 30min
user+system CPU time.

Judging from some of the comments, this seems to be the expected speed
for this type of machine. :-/

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    100+ SF Book Reviews: <URL:http://home.pages.de/~naddy/reviews/>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-03  4:00 ` Christian Weisgerber
@ 1998-08-04  4:00   ` Linus Torvalds
  1998-08-04  4:00     ` Robert Harley
                       ` (2 more replies)
  1998-08-04  4:00   ` Chris Pirih, proverbs at wolfenet dot com
                     ` (3 subsequent siblings)
  4 siblings, 3 replies; 22+ messages in thread
From: Linus Torvalds @ 1998-08-04  4:00 UTC (permalink / raw)


In article <6q55em$a58$1@mips.rhein-neckar.de>,
Christian Weisgerber <naddy@mips.rhein-neckar.de> wrote:
>
>The result on the Alpha box (Red Hat 5.1, 2.0.33, egcs-2.90.29, -O3) is
>bizarre:
>
>   1k:    149679693     *
>   2k:    149316456     *  8k 1st level cache
>   4k:    144773425     *
>   8k:    144881972     *
>  16k:    104659487     .
>  32k:    104677115     .
>  64k:    104652525     .
> 128k:    104110833     .  huh!? we have 1M
> 256k:     56204479        of 2nd level cache
> 512k:     40814057
>1024k:     32698979
>2048k:     26571787        continuously getting slower!?
>4096k:     24232887

You may have 1MB of L2 cache, but it's direct-mapped and physical, and
Linux (for good reasons) doesn't try to colour it.  So depending on how
your physical pages get spread out in memory you can't cache it all.

Anyway, it's not continuously getting slower, but the effect of the
cache is gradually getting less (you'd probably see it stagnating at
somewhere around 24000000 which would be your main memory index). 

The colouring doesn't show up for the L1, because while the L1 is
direct-mapped too, so is your memory (8kB pages), so there are no
virtual->physical translation issues for the low 13 bits of the address,
and you don't see the same effect. 

Now you know why newer CPU's tend to have multi-way associative caches. 
Much better degradation. 

			Linus



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-04  4:00   ` Linus Torvalds
@ 1998-08-04  4:00     ` Robert Harley
  1998-08-06  4:00     ` Christian Weisgerber
  1998-08-14  4:00     ` bmeyer
  2 siblings, 0 replies; 22+ messages in thread
From: Robert Harley @ 1998-08-04  4:00 UTC (permalink / raw)



Christian Weisgerber <naddy@mips.rhein-neckar.de> wrote:
>
>The result on the Alpha box (Red Hat 5.1, 2.0.33, egcs-2.90.29, -O3) is
>bizarre:
>
>   1k:    149679693     *
>   2k:    149316456     *  8k 1st level cache
>   4k:    144773425     *
>   8k:    144881972     *
>  16k:    104659487     .
>  32k:    104677115     .
>  64k:    104652525     .
> 128k:    104110833     .  huh!? we have 1M
> 256k:     56204479        of 2nd level cache
> 512k:     40814057
>1024k:     32698979
>2048k:     26571787        continuously getting slower!?
>4096k:     24232887


Here's what I got on two successive runs of your program on a PWS 500
(8K L1, 96K L2, 2M L3, 256M SDRAM) with kernel 2.0.35, egcs 1.0.3:

     1k:   1062232512    1062755612
     2k:   1061531391    1062338573
     4k:   1039505016    1039862386
     8k:   1047222456    1048294159
    16k:    863710769     743501714  *
    32k:    863224039     797739799  *
    64k:    841381958     806677243  *
   128k:    684417939     673839756
   256k:    593329490     554701343
   512k:    480981009     474114026
  1024k:    394247431     401512977
  2048k:    341795519     344795247
  4096k:    302455587     306442743
  8192k:    288015508     287996488
 16384k:    286349351     285664343
 32768k:    286640067     286410847
 65536k:    287788687     287938399
131072k:    290794815     290588750


You can see definite plateaux for L1 and L2, then a graceful
degradation that flattens out at sizes much larger than L3.

The drop-off in your figures does seem to start too early for a 1M
cache.  It looks more like 256K to me.  Other than that the shape
looks right; the drop-off is severe because you have a model that's
well known to have really slow main memory!


torvalds@transmeta.com (Linus Torvalds) writes:
> You may have 1MB of L2 cache, but it's direct-mapped and physical, and
> Linux (for good reasons) doesn't try to colour it.  So depending on how
> your physical pages get spread out in memory you can't cache it all.

I really wish that Linux did page colouring.  For sizes between L1 and
L2, there are often variations like on the starred lines above.
I'm optimising some routines for arithmetic on big polynomials which
get broken down into pieces of this size, typically.  Trying to
optimise in the face of random uncontrollable variations in timing is
difficult to say the least!

Bye,
  Rob.
         __                                             .  . ' .  . . '  *
        /\ \                                              . .   .    . .  + .
   ____/_ \ \____  .-.  .-.             __           .   *   .    . +  . . .
  /______\ \ \  /\/   \/   \  .-.    __/  \________________________________
  \  _____\ \/ / /    /\    \/   \__/  \__/                                \
   \/ / /  \/ / /    /  \   /\   /  \__/  \__    Robert.Harley@inria.fr     \
   / / /\__/_/_/\   /    `-'  \  \__/  \__/  \______________________________/
  / / /\ \_______\_'           `-'  \__/  \__/       .   .      +
  \/__\ \ \______/                     \__/        .       . +  .+. .
       \ \  /                                   .     . + .  . .     .      .
        \_\/



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-04  4:00   ` Chris Pirih, proverbs at wolfenet dot com
@ 1998-08-05  4:00     ` David A Willmore
  1998-08-12  4:00       ` Chris Pirih, proverbs at wolfenet dot com
  0 siblings, 1 reply; 22+ messages in thread
From: David A Willmore @ 1998-08-05  4:00 UTC (permalink / raw)


_@_._ (Chris Pirih, proverbs at wolfenet dot com) writes:
>My UDB gives similar strange results.  It's supposed to have 256KB cache.

>   1k:    162429336
>   2k:    161239327
>   4k:    153634196
>   8k:    152466836  L1
>  16k:    115433109
>  32k:    115493359
>  64k:    115693927
> 128k:     54652508
> 256k:     33898287  L2
> 512k:     24448508
>1024k:     21316260
>2048k:     21236215
>4096k:     21339344

>As you can see by the 1024k-4096k numbers, main memory bandwidth SUCKS.
>It is on par with my slowest 486 (DX2/66), and about half the speed of 
>my fastest 486 (AMD 160).  I thought these things were supposed to have
>64 bit memory busses!  Anyway, that's probably why it seems so slow at
>normal tasks.

IIRC, the '66s have a smaller than Alpha usual memory bus as they have a lower
pin count package and they use some of those scarse pins for an on chip PCI
bus, right?  Also, most all FP code hits memory hard, so you're going to see
a great degredation in performance running that style of code on a 66.

Another point to consider is that GCC is somewhat unusual for integer code.
Normally the two buckets are int/good cache behavior and fp/bad cache behavior.
Now, those are gross generalizations, but they are normally correct.

GCC hits the memory system harder than any other int app I know of.  Given
that you have a RISC system (somewhat larger code size, much larger pointer
size), you'll have a bigger cache footprint than an x86 running similar code.
So, since the normal GCC 'happy cache size' of 512k should be a bit bigger
on an alpha, I would guess that your true problem is that your cache size
is either set incorrectly, or, as Linus said, you're just suffering from 
poor page coloring.

I'd feel sorry for you, but my 386SX-16 gets that job. :)  It's got 4 meg,
it runs Linux 2.1.114, and, yes, it likes it.

Cheers,
David



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-03  4:00   ` Christian Weisgerber
@ 1998-08-05  4:00     ` B. James Phillippe
  0 siblings, 0 replies; 22+ messages in thread
From: B. James Phillippe @ 1998-08-05  4:00 UTC (permalink / raw)
  To: Christian Weisgerber

On 3 Aug 1998, Christian Weisgerber wrote:

> In article <Pine.LNX.3.96.980801154420.15463F-100000@earth.terran.org>,
> B. James Phillippe <bryan@terran.org> wrote:
> 
> > See my web page for some benchmarks I performed against this system
> > and several others, using BYTE's BYTEmark. You can also download the
> > package there and try it yourself. You may need to add -mieee to the
> > compilation of one of the tests to prevent the SIGFPE.
> 
> egcs-2.90.29, -O9 -mieee
>        (also  -O3, only nbench1 with -mieee)

BTW, I found and fixed the cause of the FPE in the source.

> gives about 2.0  BYTEmarks integer, 0.50 BYTEmarks float.
> 
> I haven't really looked at what these tests do, though. They don't come
> with any documentation. :-(

No, and Byte's web site appears to be pretty....disorganized.  They
apparently have several (newer) versions of this tool around.  I don't know
how much I trust the benchmark, but the numbers do seem accurate for
Intels.

-bp
--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-03  4:00 ` Christian Weisgerber
                     ` (2 preceding siblings ...)
  1998-08-04  4:00   ` Christian Weisgerber
@ 1998-08-06  4:00   ` Alex Rhomberg
  1998-08-06  4:00     ` Christian Weisgerber
  1998-08-06  4:00     ` Robert Harley
  1998-08-06  4:00   ` B. James Phillippe
  4 siblings, 2 replies; 22+ messages in thread
From: Alex Rhomberg @ 1998-08-06  4:00 UTC (permalink / raw)


Christian Weisgerber wrote:
> 
> Some further details:
> 
> Today I checked the hardware. The CPU clock is jumpered correctly to
> 233MHz. There are eleven -1024-20 cache RAMs and the cache speed jumper
> is set to the 20ns position. Looks okay to me.
> 
> The box boots with MILO. It was originally shipped with a console for NT
> but the flash ROM has since been overwritten with MILO.
> 
> I'm told the machine needs about 2..3h to compile a kernel. I haven't
> yet managed to build one, so I haven't verified this value.
> 
> I have written a very simple program in an attempt to evaluate the
> memory bandwidth of the machine. Yes, it's primitive, but I didn't have
> a proper benchmark at hand. (Any pointers?) Basically all it does is run
> through <size> bytes of memory in a *p++ +=1 loop for 15s and count
> iterations. You'd expect that if <size> fits into the cache, there'll be
> more iterations.
> 
> On my Pentium-100, 256k PB cache (FreeBSD 2.2.7, gcc 2.7.2.1, -O3), I
> get the expected result:
> 
>    1k:    185500888     *
>    2k:    185921817     *  8k 1st level cache
>    4k:    186118297     *
>    8k:    184412946     *
>   16k:    158454103     .
>   32k:    158543035     .
>   64k:    158442354     .  256k 2nd level cache
>  128k:    158063623     .
>  256k:    157281569     .
>  512k:    123673105
> 1024k:    123498417        main memory
> 2048k:    123463409
> 4096k:    123659481
> 
> The result on the Alpha box (Red Hat 5.1, 2.0.33, egcs-2.90.29, -O3) is
> bizarre:
> 
>    1k:    149679693     *
>    2k:    149316456     *  8k 1st level cache
>    4k:    144773425     *
>    8k:    144881972     *
>   16k:    104659487     .
>   32k:    104677115     .
>   64k:    104652525     .
>  128k:    104110833     .  huh!? we have 1M
>  256k:     56204479        of 2nd level cache
>  512k:     40814057
> 1024k:     32698979
> 2048k:     26571787        continuously getting slower!?
> 4096k:     24232887

You might want to replace the printf at the end with this:

    printf("%4d kWord (%5d kByte): %12ld (%4ld MByte/s)\n",
	   i/1024, i*sizeof(WORD)/1024,
	   count, count*sizeof(WORD)/RUNTIME/1000/1000);

The output of this makes the same numbers than before less bizarre :)
The performance declines when you hit the 128kWord (=1MByte) cache size.
This explanation is probably a little bit simpler than the one about
cache colouring, though when I like at my results, he still has some
points :)

For comparison the output of my PWS500:
   1 kWord (    8 kByte):    824218968 ( 439 MByte/s)
   2 kWord (   16 kByte):    824224447 ( 439 MByte/s)
   4 kWord (   32 kByte):    812589096 ( 433 MByte/s)
   8 kWord (   64 kByte):    816114182 ( 435 MByte/s) (96 kByte 2nd
Level)
  16 kWord (  128 kByte):    691893296 ( 369 MByte/s)
  32 kWord (  256 kByte):    691897996 ( 369 MByte/s)
  64 kWord (  512 kByte):    688360238 ( 367 MByte/s)
 128 kWord ( 1024 kByte):    587383787 ( 313 MByte/s)
 256 kWord ( 2048 kByte):    476236828 ( 253 MByte/s) (The end of 2M 3rd
level)
 512 kWord ( 4096 kByte):    453027348 ( 241 MByte/s)
1024 kWord ( 8192 kByte):    395769889 ( 211 MByte/s)
2048 kWord (16384 kByte):    337396159 ( 179 MByte/s)
4096 kWord (32768 kByte):    285814847 ( 152 MByte/s)

Regards
Alex

-- 
  _________________________________________________________________
 /                                                                 \
|  Alex Rhomberg                           Tel: +41 1 632 49 18     |
|  Institut fuer Elektronik                Fax: +41 1 632 12 10     |
|  ETH Zuerich                        Zentrale: +41 1 632 11 11     |
|  Gloriastrasse 35                                                 |
|  8092 Zuerich               email: rhomberg@ife.ee.ethz.ch        |
 \_________________________________________________________________/



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-06  4:00   ` Alex Rhomberg
  1998-08-06  4:00     ` Christian Weisgerber
@ 1998-08-06  4:00     ` Robert Harley
  1 sibling, 0 replies; 22+ messages in thread
From: Robert Harley @ 1998-08-06  4:00 UTC (permalink / raw)



Alex Rhomberg <rhomberg@ife.ee.ethz.ch> writes:
> [...]
> You might want to replace the printf at the end with this:
> 
>     printf("%4d kWord (%5d kByte): %12ld (%4ld MByte/s)\n",
> 	   i/1024, i*sizeof(WORD)/1024,
> 	   count, count*sizeof(WORD)/RUNTIME/1000/1000);

No, read his code again.

Rob.
         __                                             .  . ' .  . . '  *
        /\ \                                              . .   .    . .  + .
   ____/_ \ \____  .-.  .-.             __           .   *   .    . +  . . .
  /______\ \ \  /\/   \/   \  .-.    __/  \________________________________
  \  _____\ \/ / /    /\    \/   \__/  \__/                                \
   \/ / /  \/ / /    /  \   /\   /  \__/  \__    Robert.Harley@inria.fr     \
   / / /\__/_/_/\   /    `-'  \  \__/  \__/  \______________________________/
  / / /\ \_______\_'           `-'  \__/  \__/       .   .      +
  \/__\ \ \______/                     \__/        .       . +  .+. .
       \ \  /                                   .     . + .  . .     .      .
        \_\/



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-06  4:00   ` Alex Rhomberg
@ 1998-08-06  4:00     ` Christian Weisgerber
  1998-08-06  4:00     ` Robert Harley
  1 sibling, 0 replies; 22+ messages in thread
From: Christian Weisgerber @ 1998-08-06  4:00 UTC (permalink / raw)


(BTW, while I certainly appreciate the various comments, all these
copies by E-mail are very bad netiquette.)

> You might want to replace the printf at the end with this:
> 
>     printf("%4d kWord (%5d kByte): %12ld (%4ld MByte/s)\n", [...]
> 
> The output of this makes the same numbers than before less bizarre :)

And wrong.
Check the program, it's really kBytes not kWords.

> The performance declines when you hit the 128kWord (=1MByte) cache
> size.

Nope. 128kB.

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    100+ SF Book Reviews: <URL:http://home.pages.de/~naddy/reviews/>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-04  4:00   ` Linus Torvalds
  1998-08-04  4:00     ` Robert Harley
@ 1998-08-06  4:00     ` Christian Weisgerber
  1998-08-14  4:00     ` bmeyer
  2 siblings, 0 replies; 22+ messages in thread
From: Christian Weisgerber @ 1998-08-06  4:00 UTC (permalink / raw)


In article <6q6e4j$8c3$1@palladium.transmeta.com>, Linus Torvalds
<torvalds@transmeta.com> wrote:

> [.... direct-mapped cache... coloring... multi-way associative
> caches...]

Uh, this is kind of embarrassing, but can anybody offer any pointers to
some background information that would help me to understand what Linus
is talking about?

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    100+ SF Book Reviews: <URL:http://home.pages.de/~naddy/reviews/>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-03  4:00 ` Christian Weisgerber
                     ` (3 preceding siblings ...)
  1998-08-06  4:00   ` Alex Rhomberg
@ 1998-08-06  4:00   ` B. James Phillippe
  4 siblings, 0 replies; 22+ messages in thread
From: B. James Phillippe @ 1998-08-06  4:00 UTC (permalink / raw)
  To: Christian Weisgerber

On 3 Aug 1998, Christian Weisgerber wrote:

> Some further details:
...
> I have written a very simple program in an attempt to evaluate the
> memory bandwidth of the machine. Yes, it's primitive, but I didn't have

Hey, this is a pretty cool utility. :)  Here are the (*best*) results for
my AS200 4/233 unit.  Most dropped off substantially at 256k.

% /tmp/cache-test
   1k:    382522357
   2k:    382387705
   4k:    381646188
   8k:    380285518
  16k:    374499835
  32k:    267253969
  64k:    260420847
 128k:    153378371
 256k:    148622663
 512k:    103563281
1024k:     83295467
2048k:     75724739
4096k:     73843686

cheers,
-bp
--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-05  4:00     ` David A Willmore
@ 1998-08-12  4:00       ` Chris Pirih, proverbs at wolfenet dot com
  0 siblings, 0 replies; 22+ messages in thread
From: Chris Pirih, proverbs at wolfenet dot com @ 1998-08-12  4:00 UTC (permalink / raw)


In article <willmore.902336065@whelk>,
 willmore@whelk.cig.mot.com (David A Willmore) wrote:
| I'd feel sorry for you, 

No need to feel sorry for me; the UDB is just for porting.  I have
plenty of fast machines for running Quake. :)

| but my 386SX-16 gets that job. :)  It's got 4 meg,
| it runs Linux 2.1.114, and, yes, it likes it.

I'll bet that was quite a machine in 1988!

---
chris



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Why is our Alpha box so slow?
  1998-08-04  4:00   ` Linus Torvalds
  1998-08-04  4:00     ` Robert Harley
  1998-08-06  4:00     ` Christian Weisgerber
@ 1998-08-14  4:00     ` bmeyer
  2 siblings, 0 replies; 22+ messages in thread
From: bmeyer @ 1998-08-14  4:00 UTC (permalink / raw)


torvalds@transmeta.com (Linus Torvalds) writes:

>You may have 1MB of L2 cache, but it's direct-mapped and physical, and
>Linux (for good reasons) doesn't try to colour it.  So depending on how
>your physical pages get spread out in memory you can't cache it all.

Which brings up a question.... Is there some way to do request memory
that maps to certain parts in the caches? Or at least to find out the
relevant address bits of some memory after having allocated it?

And if so, is there any way (hopefully short of mlock()ing everything)
to make it stay there? Maybe even portably for the 21064/066/164?

I am asking because I am playing around with UAE, the Amiga emulator, and
it is somehow disconcerting to get massively different benchmark results
when starting the exact same piece of software twice. There are a few
data structures which are used extensively, and I suspect on the slow
runs, they are kicking each other out of the caches....

Bernie
-- 
============================================================================
"It's a magical world, Hobbes ol' buddy...
    	                                   ...let's go exploring"
Calvin's final words, on December 31st, 1995



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~1998-08-14  4:00 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-01  4:00 Why is our Alpha box so slow? Christian Weisgerber
1998-08-01  4:00 ` Paul Tomblin
1998-08-01  4:00 ` B. James Phillippe
1998-08-03  4:00   ` Christian Weisgerber
1998-08-05  4:00     ` B. James Phillippe
1998-08-03  4:00   ` Eric Christy
1998-08-01  4:00 ` Greg Lindahl
1998-08-03  4:00   ` Christian Weisgerber
1998-08-02  4:00 ` Carlos Vidal
1998-08-03  4:00 ` Christian Weisgerber
1998-08-04  4:00   ` Linus Torvalds
1998-08-04  4:00     ` Robert Harley
1998-08-06  4:00     ` Christian Weisgerber
1998-08-14  4:00     ` bmeyer
1998-08-04  4:00   ` Chris Pirih, proverbs at wolfenet dot com
1998-08-05  4:00     ` David A Willmore
1998-08-12  4:00       ` Chris Pirih, proverbs at wolfenet dot com
1998-08-04  4:00   ` Christian Weisgerber
1998-08-06  4:00   ` Alex Rhomberg
1998-08-06  4:00     ` Christian Weisgerber
1998-08-06  4:00     ` Robert Harley
1998-08-06  4:00   ` B. James Phillippe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox