Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: espen@unm.edu (Peter Espen)
Subject: Our DEC Alpha is the slowest on this code ....
Date: 26 Aug 1993 21:23:22 -0600	[thread overview]
Message-ID: <25juna$n5e@polaris.unm.edu> (raw)



Our company ports code to a lot of different unix systems.  We have in the
lab:

	IBM RS/6000 running AIX
	DEC Alpha running OSF/1 1.2
	Motorola running 88open (88000 based)
	Apple Quadra 900 running A/UX 3.0
	IBM PS/2 running AIX
	Sun Sparc running SunOS 4.xx and Solaris
	.
	etc. etc.

We have come across some sort of weakness on the Dec Alpha that causes
a real slowdown in execution speed.  Even the Apple Quadra 900 running A/UX
runs rings around the Alpha on the following little test program.  Anyone
know why?

Here is the test program:

/*********************************************************/

#include<stdio.h>
#include <fcntl.h>

/*
 * Set RECSIZE to the size of each record ( up to 128 bytes ).
 * Set RECS to the number of writes.
 * Adjust them so that RECSIZE * RECS gives the desired size of file "foo".
 */
#define RECSIZE 13
#define RECS 5042

main()
{

  int fd,i,val;
  char buf1[128];
  char buf2[128];

  /* Fill up a couple of bogus buffers to write out */
  for( i = 0; i < RECSIZE; i++ ) {
    buf1[i] = 'X';
    buf2[i] = 'O'; 
  }

  unlink("./foo");
  fd = open("./foo",O_CREAT|O_RDWR,0644);

  /* 
   * Unbuffer stdout so I can see how fast things are printing out.
   */ 
  setbuf(stdout,NULL);

  printf("creating file...\n");
  for( i = 0; i < RECS; i++ ) {
    write(fd,buf1,RECSIZE);
    if ( !(i%100) )    /* print out every hundredth write. */
      printf("%d ",i);
  }
  printf("\n");

  printf("random access...\n");
  for ( i = 0; i < RECS; i++ ) {
    val = rand()%RECS;
    lseek(fd,0,0);        /* rewind the file then jump to a random offset */
    lseek(fd,val*RECSIZE,0);
    write(fd,buf2,RECSIZE);
    if ( !(i%100) )
      printf("%d ",val*RECSIZE);
  }
  printf("\n");
}


/******************************************************************/


Here is the output of uname -a on the alpha:

	OSF1 jeremy 1.2 10 alpha

If anyone has an idea of why the Alpha is so slow on this test code....
lets hear it!

Thanks!

Peter Espen
espen@polaris.unm.edu






             reply	other threads:[~1993-08-27  3:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-27  3:23 Peter Espen [this message]
1993-08-27  9:29 ` Our DEC Alpha is the slowest on this code Terry Kennedy, Operations Mgr.
1993-08-27 13:55 ` Marcus J. Ranum
1993-08-27 15:24   ` Brent McClure
1993-08-28 18:32     ` Fred Morris
1993-08-27 14:22 ` Dirk Grunwald
1993-08-27 16:16 ` Martin Minow
1993-08-27 21:40 ` Alan Rollow - Alan's Home for Wayward Tumbleweeds.
1993-09-02 14:55   ` delay_wbuffers (was Re: Our DEC Alpha is the slowest on this code ....) John Hascall
1993-09-02 18:16     ` Alan Rollow - Alan's Home for Wayward Tumbleweeds.
1993-08-27 22:29 ` Our DEC Alpha is the slowest on this code Dirk Grunwald
1993-08-28 15:35 ` Roland Meier
1993-08-29 16:54   ` Dirk Grunwald
1993-08-31 12:35     ` Jari Tavi
1993-09-02  3:35       ` Thor Lancelot Simon
  -- strict thread matches above, loose matches on Subject: below --
1993-09-07 12:44 Brent Sterner
1993-09-08  0:20 ` Russ Jones
1993-09-08 13:26   ` Brent Sterner
1993-09-08 18:10     ` Alan Rollow - Alan's Home for Wayward Tumbleweeds.
read-only archive

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