Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Our DEC Alpha is the slowest on this code ....
@ 1993-08-27  3:23 Peter Espen
  1993-08-27  9:29 ` Terry Kennedy, Operations Mgr.
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Peter Espen @ 1993-08-27  3:23 UTC (permalink / 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






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

end of thread, other threads:[~1993-09-02 18:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-08-27  3:23 Our DEC Alpha is the slowest on this code Peter Espen
1993-08-27  9:29 ` 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

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