From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,8a2fb3beb902dc3a,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-10-25 10:48:41 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!paladin.american.edu!zombie.ncsc.mil!news.mathworks.com!yeshua.marcam.com!charnel.ecst.csuchico.edu!olivea!uunet!psinntp!hk.super.net!hk.super.net!not-for-mail From: lijewski@HK.Super.NET (Mr Mike James Lijewski) Newsgroups: comp.sys.dec Subject: poor SSD (EZ51R) performance Date: 25 Oct 1994 16:15:25 +0800 Organization: Hong Kong SuperNet Message-ID: <38ieqt$doh@hk.super.net> NNTP-Posting-Host: 202.14.67.4 Summary: SSD performance The following script illustrates an attempt to understand the performance (or lack thereof) of an EZ51R Solid State Disk (SSD). According to the DEC documentation on the disk the maximum throughput is 800 I/Os per second. The best I get in my tests is about 250 I/Os per second from one process doing random writes. I consider this too far off the expected maximum to be acceptable. This was run on a four processor DEC Model 2100/500 under OSF/1 V3.0. Would someone with access to an SSD please repeat my experiment. Either something is seriously wrong with my setup or I've been sold a bill of goods. Script started on Mon Oct 24 08:51:11 1994 :/tmp/stuff:$ uname -a OSF1 bsr02 V3.0 358 alpha :/tmp/stuff:$ disklabel -r /dev/rrz9c # /dev/rrz9c: type: SCSI disk: MIKE label: flags: bytes/sector: 512 sectors/track: 33 tracks/cylinder: 9 sectors/cylinder: 297 cylinders: 776 sectors/unit: 208800 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize cpg] a: 40960 0 unused 1024 8192 # (Cyl. 0 - 137*) b: 0 0 unused 0 0 # (Cyl. 0 - -1) c: 208800 0 unused 1024 8192 # (Cyl. 0 - 703*) d: 0 0 unused 0 0 # (Cyl. 0 - -1) e: 0 0 unused 0 0 # (Cyl. 0 - -1) f: 0 0 unused 0 0 # (Cyl. 0 - -1) g: 167840 40960 unused 1024 8192 # (Cyl. 137*- 703*) h: 0 0 unused 0 0 # (Cyl. 0 - -1) :/tmp/stuff:$ cat traw.c #include #include #include #include #include #include #include #define BLOCKSIZE 1024 /* Maximum size of each write. */ #define FILESIZE (1000*BLOCKSIZE) /* Size of file being randomly updated. */ static double elapsed_seconds (struct timeval* tp) { static struct timeval otp; static struct timezone tzp; otp = *tp; if (gettimeofday(tp, &tzp) < 0) perror("gettimeofday"), exit(1); return (tp->tv_sec - otp.tv_sec) + (tp->tv_usec - otp.tv_usec)/1000000.0; } int main () { char* fp = 0; int i = 0, fd = 0; const int Count = 5000; const char* file = "/dev/rrz9g"; struct timeval timer = { 0, 0 }; unsigned char buf[BLOCKSIZE]; srandom(13); /* Use the same random seed for repeatability. */ if ((fd = open(file, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0) perror("open"), exit(1); memset(buf, 'x', BLOCKSIZE); /* Initialize buf to known value. */ (void) fprintf(stderr, "Building %d byte file in memory ...\n", FILESIZE); if ((fp = (char*) malloc(FILESIZE)) == 0) fprintf(stderr, "malloc() failed, bye\n"), exit(1); memset(fp, '#', FILESIZE); /* Touch every byte in buffer. */ (void) fprintf(stderr, "Writing %d bytes to %s ...\n", FILESIZE, file); (void) elapsed_seconds(&timer); if (!(write(fd, fp, FILESIZE) == FILESIZE)) perror("write"), exit(1); if (fsync(fd) < 0) perror("fsync"),exit(1); (void) fprintf(stderr, "Wrote %d bytes to %s in %g seconds.\n", FILESIZE, file, elapsed_seconds(&timer)); free(fp); (void) fprintf(stderr, "Doing %d random writes to %s ...\n", Count, file); (void) elapsed_seconds(&timer); for (i = 0; i < Count; i++) { int size = random() % (BLOCKSIZE-1) + 1; if (lseek(fd, random()%(FILESIZE-BLOCKSIZE-1), SEEK_SET) < 0) perror("lseek"), exit(1); if (!(write(fd, buf, size) == size)) perror("write"), exit(1); if (fsync(fd) < 0) perror("fsync"), exit(1); } (void) fprintf(stderr, "Average write time per block was %g seconds.\n", elapsed_seconds(&timer)/Count); return 0; } :/tmp/stuff:$ cc -O -o traw traw.c :/tmp/stuff:$ ./traw Building 1024000 byte file in memory ... Writing 1024000 bytes to /dev/rrz9g ... Wrote 1024000 bytes to /dev/rrz9g in 0.574864 seconds. Doing 5000 random writes to /dev/rrz9g ... Average write time per block was 0.00396994 seconds. :/tmp/stuff:$ exit script done on Mon Oct 24 08:52:32 1994