* Re: Our DEC Alpha is the slowest on this code ....
@ 1993-09-07 12:44 Brent Sterner
1993-09-08 0:20 ` Russ Jones
0 siblings, 1 reply; 17+ messages in thread
From: Brent Sterner @ 1993-09-07 12:44 UTC (permalink / raw)
I tried to reply to roland@hamul3.hbf.dec.com - it didn't get through.
So I'll post instead.
>From: roland@hamul3.hbf.dec.com (Roland Meier)
>Subject:Re: Our DEC Alpha is the slowest on this code ....
>Date: 28 Aug 1993 15:35:03 GMT
>
>What you have expected is probably an elapsed time in the 1-2 second range.
>There are two methods to achieve that. OSF/1 V1.3 has a new filesystem
>(AdvFS - DEC advanced filesystem) as an option but at *no* additional cost
>since the license is bundled with the OS. Running your program with this
>filesystem lead to an elapsed time of about 1s without compromising data
>integrity in case of a system failure.
Hi Roland. Is there somewhere I could read about AdvFS? White
papers? Further, if the AdvFS license is bundled, why is it not
"standard"? Are there compatibility issues? Thanks, b.
PS Perhaps you could elaborate for the net too. b.
--
Brent Sterner EP/IX System Manager Apprentice
Fast: <BRENT@uwovax.uwo.ca> <129.100.2.13>
Medium: (519)661-2151 x 6036 Fax: (519)661-3486
Slow: Computing & Communications Services, Natural Sciences Building
The University of Western Ontario, London, Ontario, Canada N6A 5B7
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: Our DEC Alpha is the slowest on this code .... 1993-09-07 12:44 Our DEC Alpha is the slowest on this code Brent Sterner @ 1993-09-08 0:20 ` Russ Jones 1993-09-08 13:26 ` Brent Sterner 0 siblings, 1 reply; 17+ messages in thread From: Russ Jones @ 1993-09-08 0:20 UTC (permalink / raw) In article <1993Sep7.084426.1@uwovax.uwo.ca>, brent@uwovax.uwo.ca (Brent Sterner) writes: > > Hi Roland. Is there somewhere I could read about AdvFS? White > papers? Further, if the AdvFS license is bundled, why is it not > "standard"? Are there compatibility issues? Thanks, b. > > PS Perhaps you could elaborate for the net too. b. > -- > Brent Sterner EP/IX System Manager Apprentice Brent, The AdvFS or DEC advanced filesystem is actually called the POLYCENTER Advanced File System. From the DEC OSF/1 V1.3 Software Product Description (SPD#41.61.03): The POLYCENTER Advanced File System is a local file system that uses journaling to recover from unplanned system restarts, such as power failures, significantly faster than the standard UNIX File System (UFS). In addition to fast restart, POLYCENTER Advanced File System improves the integrity and consistency of file system structures; extends file sizes to greater than 2 Gigabytes; enhances backup utilities by writ- ing data to archive media in compressed form; and enables fast file creation and deletion. The right to use the POLYCENTER Advanced File System is granted by the DEC OSF/1 V1.3 license. However, binaries and on-line documentation are separately available on the Digital Consolidated Distribution CD- ROM, rather than on the DEC OSF/1 CD-ROM. For customers who require greater system availability, on-line file system resizing, and added performance, Digital offers the POLYCENTER Advanced File System Utilities as an incremental layered product. For more information on part numbers and prices (USA anyway) for both of these products, look at: gatekeeper.dec.com: /pub/DEC/DECnews-UNIX/ 0601.txt POLYCENTER Advanced File System V1.0 0602.txt POLYCENTER Advanced File System Utilities V1.0 This directory contains back issues of DECnews for UNIX, Digital's UNIX newsletter for the Internet community. For subscription information, send mail to decnews-unix@pa.dec.com with a subject line of help. Also, the POLYCENTER Advanced File System Utilities, V1.0 Software Product Description (SPD) can be found at: gatekeeper.dec.com: /pub/DEC/SPD/44.52.00 Hope this helps, -- Russ Jones Digital Equipment Corporation ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 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. 0 siblings, 1 reply; 17+ messages in thread From: Brent Sterner @ 1993-09-08 13:26 UTC (permalink / raw) In article <26j8h2$3sd@usenet.pa.dec.com>, rjones@pa.dec.com (Russ Jones) writes: > Brent, > > The AdvFS or DEC advanced filesystem is actually called the POLYCENTER > Advanced File System. From the DEC OSF/1 V1.3 Software Product Description > (SPD#41.61.03): < stuff deleted > > Hope this helps, Russ, thanks. Yes, it helps. One follow-on query though. If this fs is so good, is there any reason *not* to use it? (Supplemental: if not, why isn't it bundled and standard?) b. -- Brent Sterner EP/IX System Manager Apprentice Fast: <BRENT@uwovax.uwo.ca> <129.100.2.13> ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-09-08 13:26 ` Brent Sterner @ 1993-09-08 18:10 ` Alan Rollow - Alan's Home for Wayward Tumbleweeds. 0 siblings, 0 replies; 17+ messages in thread From: Alan Rollow - Alan's Home for Wayward Tumbleweeds. @ 1993-09-08 18:10 UTC (permalink / raw) In article <1993Sep8.092621.1@uwovax.uwo.ca>, brent@uwovax.uwo.ca (Brent Sterner) writes: > > Russ, thanks. Yes, it helps. One follow-on query though. > If this fs is so good, is there any reason *not* to use it? > (Supplemental: if not, why isn't it bundled and standard?) b. Bundling an entire new file system into the system takes time to do the integration work. A slip on the part of the group doing the file system slips the schedule of the base product. A slip of the base product has the file system group being idle while they wait for their product to go out the door, or they wait for their base functionality to appear at customer sites so they can start selling the layered product tools. It is a general software engineering problem of making major changes to a software system. It is often desirable to stage the introduction of something big that could adversely affect the rest of the system if the integration isn't perfect. One problem with it not being bundled is that you can't put /usr on it and still be able to do upgrades. With tight integration an OS upgrade gets all the pieces, including the various file systems. It has to for the upgrade to work. Until the tight integration is there, interesting parts of the file system could become unavailable until the upgrade is complete and you can't complete the upgrade until those file systems are available. For something like the POLYCENTER Advanced File System you could expect the long term integration to go like: Bundle the license, layer the software. Bundle the software as an option. Wait... This wait gives customers the opportunity to learn how to manage it. Make the software the default subsystem. You can try to compress the steps, but if anything breaks along the way, you may have to many side affects. -- >Brent Sterner EP/IX System Manager Apprentice >Fast: <BRENT@uwovax.uwo.ca> <129.100.2.13> > -- Alan Rollow alan@nabeth.cxo.dec.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* 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; 17+ 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] 17+ messages in thread* Re: 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. 1993-08-27 13:55 ` Marcus J. Ranum ` (5 subsequent siblings) 6 siblings, 0 replies; 17+ messages in thread From: Terry Kennedy, Operations Mgr. @ 1993-08-27 9:29 UTC (permalink / raw) In article <25juna$n5e@polaris.unm.edu>, espen@unm.edu (Peter Espen) writes: > If anyone has an idea of why the Alpha is so slow on this test code.... > lets hear it! How slow is it? On one of our homebrew Unix boxes, this program gives me: [0:18] spcuna:~> time footest creating file... 0 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5000 random access... 2288 15288 44954 48958 57044 9828 23530 22542 33644 48126 64168 16588 5122 2678 51142 48932 22386 31876 33670 20462 28886 31304 7540 13312 32266 4628 16666 7592 11232 33410 2860 54340 24908 63284 38480 49348 56108 4212 42510 43056 52546 37778 18408 13728 0.110u 1.050s 0:01.32 87.8% 0+0k 0+31io 0pf+0w [1:19] spcuna:~> Terry Kennedy Operations Manager, Academic Computing terry@spcvxa.bitnet St. Peter's College, Jersey City, NJ USA terry@spcvxa.spc.edu +1 201 915 9381 ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: 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. @ 1993-08-27 13:55 ` Marcus J. Ranum 1993-08-27 15:24 ` Brent McClure 1993-08-27 14:22 ` Dirk Grunwald ` (4 subsequent siblings) 6 siblings, 1 reply; 17+ messages in thread From: Marcus J. Ranum @ 1993-08-27 13:55 UTC (permalink / raw) espen@unm.edu (Peter Espen) writes: >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? > [source deleted] The test program you posted is entirely file I/O -- so what you're measuring is the implementation of the filesystem and I/O system calls more than the speed of the processor chip. It's not a question of "execution speed", it's a totally I/O bound application. Try running it on the Alpha with a RAM disk and see how fast it is. ;) That being said, you've got major differences between the various implementations of the filesystems on the boxes you list. It also depends on the sizes of the buffer caches, and the cache flushing strategy that the system in question uses. ULTRIX used to get bitten by the same "benchmark" you posted, because it queues blocks for write immediately after the cache is updated, while other systems such as SunOs queue blocks for deferred write. There used to be (still is, no doubt) a value in the ULTRIX kernel (delay_wbuffers) that could be enabled, to prevent this type of behavior if an application required it. In fact, the code you post looks suspiciously like the random write "benchmark" that Sun sales support folks were urging people to run against ULTRIX boxes, because it was designed with knowledge of how ULTRIX' filesystem worked to make it look bad. Where did you say you got that code? :) Filesystems are the land of infinite tradeoffs. You can always find a test that will make any given filesystem look worse than another [running it on an RA-81 is a simple means ;)] I haven't got access to OSF/1 or an Alpha or benchmarks for their filesystem, but if you want more accurate information for how a given box's filesystem throughput is, I suggest you look at something like Unix World's tested mettle column, and see how the various systems stack up. Their I/O benchmarks are a little broader and more general. mjr. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-08-27 13:55 ` Marcus J. Ranum @ 1993-08-27 15:24 ` Brent McClure 1993-08-28 18:32 ` Fred Morris 0 siblings, 1 reply; 17+ messages in thread From: Brent McClure @ 1993-08-27 15:24 UTC (permalink / raw) In article <25l3nt$l15@sol.TIS.COM> mjr@tis.com (Marcus J. Ranum) writes: >In fact, the code you post looks suspiciously like the random >write "benchmark" that Sun sales support folks were urging people to >run against ULTRIX boxes, because it was designed with knowledge of >how ULTRIX' filesystem worked to make it look bad. Where did you say >you got that code? :) > Actually he got it from me. I work with peter and now that we've been figured out I'll go ahead and fess up. One of the machines I ran that program on was an old AT&T 3b2 that is lying around our shop. Even the 3b2 completed the program faster than the alpha! So our plan was to round up a bunch of old 3b2's and cleverly market them with a colorful brochure showing the results of my "benchmark" that clearly shows that the 3b2 outperforms the Dec Alpha... God we would have made a killing! Well anyhow now that its been blown wide open I guess we'll drop the whole thing and apologize to the net for this whole shameful affair. --Brent McClure ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-08-27 15:24 ` Brent McClure @ 1993-08-28 18:32 ` Fred Morris 0 siblings, 0 replies; 17+ messages in thread From: Fred Morris @ 1993-08-28 18:32 UTC (permalink / raw) mcclure@tiguex.cs.unm.edu (Brent McClure) writes: >One of the machines I ran that program on was an old AT&T 3b2 that is >lying around our shop. Even the 3b2 completed the program faster than >the alpha! So our plan was to round up a bunch of old 3b2's and cleverly >market them with a colorful brochure showing the results of my "benchmark" >that clearly shows that the 3b2 outperforms the Dec Alpha... BAW HAW HAW! *ROTFL* might work! m3047@halcyon.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: 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. 1993-08-27 13:55 ` Marcus J. Ranum @ 1993-08-27 14:22 ` Dirk Grunwald 1993-08-27 16:16 ` Martin Minow ` (3 subsequent siblings) 6 siblings, 0 replies; 17+ messages in thread From: Dirk Grunwald @ 1993-08-27 14:22 UTC (permalink / raw) There was some earlier mail about this being slow under OSF1. I ran this under OSF V1.3, with a DEC DSP3160 disk drive (i.e. fast). I also ran in in /tmp, which is a memory file system on my machine. Results follow [foobar-76] time bar creating file... 0 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5000 random access... 22256 2080 19409 35750 43134 14625 22048 63037 5369 39884 20839 49660 58955 31642 53560 403 21827 19929 36660 10387 30745 8619 55744 32058 12818 36699 1560 1859 9529 43563 56901 32682 8411 60866 4784 49738 37375 45175 43381 15197 62348 37323 28158 55770 15847 60359 57824 32292 22399 49426 44174 0.046u 0.922s 0:35.50 2.7% 0+0k 1+3io 0pf+0w [foobar-82] mv bar /tmp/ ; cd /bar [foobar-85] time ./bar creating file... 0 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5000 random access... 22256 2080 19409 35750 43134 14625 22048 63037 5369 39884 20839 49660 58955 31642 53560 403 21827 19929 36660 10387 30745 8619 55744 32058 12818 36699 1560 1859 9529 43563 56901 32682 8411 60866 4784 49738 37375 45175 43381 15197 62348 37323 28158 55770 15847 60359 57824 32292 22399 49426 44174 0.066u 0.951s 0:01.62 62.3% 0+0k 0+4io 0pf+0w [foobar-86] ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-08-27 3:23 Peter Espen ` (2 preceding siblings ...) 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. ` (2 subsequent siblings) 6 siblings, 0 replies; 17+ messages in thread From: Martin Minow @ 1993-08-27 16:16 UTC (permalink / raw) In article <25juna$n5e@polaris.unm.edu>, espen@unm.edu (Peter Espen) wrote: > Our company ports code to a lot of different unix systems... > .. > We have come across some sort of weakness on the Dec Alpha that causes > a real slowdown in execution speed... > [From the test program]: > 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); This is a test of the I/O subsystem and, in particular, the disk driver firmware. In many systems, writing to a device buffers the data in the device's internal hardware buffers for subsequent writing to the media itself. In other systems, writing isn't complete until the data is actually on the physical disk. Also, Unix has different buffering strategies for staging writes from application programs to the device itself. You may wish to check whether the disks you use are using the same buffering parameters: a week or two with the ANSI SCSI spec will lead you to the parameters -- they are standardized (more so than Unix). By the way, what is the purpose of this benchmark? It certainly penalizes hardware/software developers who emphasize reliability over raw performance. Martin Minow The above does not represent the position of Apple Computer Inc. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-08-27 3:23 Peter Espen ` (3 preceding siblings ...) 1993-08-27 16:16 ` Martin Minow @ 1993-08-27 21:40 ` Alan Rollow - Alan's Home for Wayward Tumbleweeds. 1993-08-27 22:29 ` Dirk Grunwald 1993-08-28 15:35 ` Roland Meier 6 siblings, 0 replies; 17+ messages in thread From: Alan Rollow - Alan's Home for Wayward Tumbleweeds. @ 1993-08-27 21:40 UTC (permalink / raw) In article <25juna$n5e@polaris.unm.edu>, espen@unm.edu (Peter Espen) writes: >Our company ports code to a lot of different unix systems. We have in the >lab: > > [ List deleted. ] >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? [ This is an updated version of a follow-up to a version of the original question that was posted to comp.sys.osf.misc. ] Using a similar program that let me adjust a "block" size and the I/O size, I was able to do some experimentation. The program is below. The problem had been noticed by some other customers using FORTRAN and it has been reported internally. The problem is still present in V1.3, so the earliest it would be fixed without a patch is the next version after V1.3. From my experiments, it appears there is a special boundary every 64 KB. When I/Os cross this boundary either the current or previous buffer is written asynchronously. As long as a buffer is in transit, further attempts to update it are blocked until the I/O is complete. In the cases of the original program and mine a small number of buffers are being updated more quickly than their writes can complete, so the program is I/O bound. The behaviour can be changed somewhat by changing the value of delay_wbuffers. When set it causes writes that would ordinarily be started right away to be delayed until flushed with a sync (sync(2) or fsync(2)). The advantage for this sort of application is that it allows more write-merging. The disadvantage is that it applies to all file systems and allows more data to become stale. If the system is unstable for any reason, this stale data will be lost in a crash. Another potential solution to this problem (depending on the system) is Prestoserve. I believe it will also cache some asynchronous writes as well as synchronous ones. While this won't merge all the writes, it will help some of them. If the file system that is the target of this sort of I/O can be isolated, it may worthwhile to mount the file system for synchronous writes (or open the file for synchronous writes). With Prestoserve enabled, all the synchronous writes will benefit from the cache. Other follow-ups in the string mentioned ULTRIX having a similar problem. In that case, the condition that caused delay_wbuffers to be examined was when a transfer ended on a file system block boundary. Clearly the OSF condition seems to be different. * * * Here is the program. The arguments are: program file-name block-size io-size It writes 2 "block-size" blocks and then goes through a loop seeking back and forth between the two, writing an "io-size" buffer after each lseek. When the I/O stays within one 64 KB area, the program makes the area dirty, but little I/O occurs. For example: program data 32768 8192 runs very fast, but: program data 65536 8192 doesn't. /* * Author: Alan Rollow, Subsystems Engineering, Digital Equipment Corp. * File: %M% * Date: %G% * Version: %I% * * %M% - Exercise the magic 64 KB boundary. */ #ifndef lint static char SccsId[] = "%W% %G%" ; #endif #include <sys/types.h> #include <sys/file.h> #include <stdio.h> #include <errno.h> char *program ; main(argc, argv) int argc ; char *argv[] ; { char *file ; register fd, size, iosize ; if( argc < 4 ) { fprintf(stderr, "usage: %s file size iosize\n", argv[0]) ; exit(-1) ; } else { program = argv[0] ; file = argv[1] ; size = atoi(argv[2]) ; iosize = atoi(argv[3]) ; } if((fd = open(file, O_WRONLY|O_CREAT, 0644)) == -1 ) { fprintf(stderr, "%s: Can't open %s: %s.\n", program, file, strerror(errno)) ; exit(errno) ; } write_file(fd, file, size) ; exercise_file(fd, file, size, iosize) ; if( close(fd) == -1 ) fprintf(stderr, "%s: Can't close %s: %s.\n", program, file, strerror(errno)) ; return 0 ; } #define NBLOCKS (2) /* * Write NBLOCKS blocks of "size" in the file. */ write_file(fd, file, size) int fd, size ; char *file ; { char *buffer ; void *malloc() ; int rc ; if((buffer = (char *)malloc(size * NBLOCKS)) == NULL ) { fprintf(stderr, "%s: Can't allocate %d bytes: %s.\n", program, size * NBLOCKS, strerror(errno)) ; exit(errno) ; } if((rc = write(fd, buffer, size * NBLOCKS)) == -1 ) { fprintf(stderr, "%s: Write error on %s: %s.\n", program, file, strerror(errno)) ; exit(errno) ; } else if( rc != (size * NBLOCKS)) { fprintf(stderr, "%s: Short write of %d bytes on %s.\n", program, rc, file) ; exit(-1) ; } else free((void *)buffer) ; return ; } #define ALOT 1000 /* * The file consists of two block of "size" bytes each. Seeking * between block, write "iosize" bytes. Do this "ALOT" of times * and measure the time as simply as possible. */ exercise_file(fd, file, size, iosize) register fd ; int size ; char *file ; register iosize ; { time_t before, after, time() ; register loops, rc ; register char *buffer ; register size_t total ; if((buffer = (char *)malloc(iosize)) == NULL ) { fprintf(stderr, "%s: Can't allocate %d bytes: %s.\n", program, iosize, strerror(errno)) ; exit(errno) ; } loops = ALOT ; total = 0L ; before = time((time_t)0) ; /* * Seek to the beginning of the first "size" block and write * something, then seek to the beginning 2nd "size" block * and write something. * * It appears, that when the I/Os spans a 64 KB boundary * the previous buffer is flushed. The guess of the author * is that the I/O is started to complete asynchronously. * * If the I/O stays within one of these 64 KB boundaries, * very little I/O occurs. */ while( loops-- ) { if( lseek(fd, 0L, SEEK_SET) == -1 ) fprintf(stderr, "%s: Rewind failed on %s: %s.\n", program, file, strerror(errno)) ; if((rc = write(fd, buffer, iosize)) == -1 ) fprintf(stderr, "%s: First write failed on %s: %s.\n", program, file, strerror(errno)) ; else total += rc ; if( lseek(fd, (off_t)size, SEEK_SET) == -1 ) fprintf(stderr, "%s: Seek failed on %s: %s.\n", program, file, strerror(errno)) ; if((rc = write(fd, buffer, iosize)) == -1 ) fprintf(stderr, "%s: Second write failed on %s: %s.\n", program, file, strerror(errno)) ; else total += rc ; } after = time((time_t)0) ; free((void *)buffer) ; if( after - before ) { printf("%d I/Os in %d seconds: %f tps, %f KB/sec.\n", ALOT * 2, after - before, (double)(ALOT * 2)/(after - before), (double)(total / 1024)/(after - before)) ; } else printf("%d I/Os and %d KB too fast.\n", ALOT * 2, total / 1024) ; } > > [ The customer's program deleted. ] >Thanks! > >Peter Espen >espen@polaris.unm.edu > -- Alan Rollow alan@nabeth.cxo.dec.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-08-27 3:23 Peter Espen ` (4 preceding siblings ...) 1993-08-27 21:40 ` Alan Rollow - Alan's Home for Wayward Tumbleweeds. @ 1993-08-27 22:29 ` Dirk Grunwald 1993-08-28 15:35 ` Roland Meier 6 siblings, 0 replies; 17+ messages in thread From: Dirk Grunwald @ 1993-08-27 22:29 UTC (permalink / raw) If you do the following, the performance increases to.... [foobar-113] time ./bar creating file... 0 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5000 random access... 22256 2080 19409 35750 43134 14625 22048 63037 5369 39884 20839 49660 58955 31642 53560 403 21827 19929 36660 10387 30745 8619 55744 32058 12818 36699 1560 1859 9529 43563 56901 32682 8411 60866 4784 49738 37375 45175 43381 15197 62348 37323 28158 55770 15847 60359 57824 32292 22399 49426 44174 0.037u 0.510s 0:00.87 62.0% 0+0k 2+6io 0pf+0w > o Cache buffers > > There is a flag "delayed_bufferwrites" that introduces delayed buffer > cache writes and is particularly effective in programs that randomly > read and write small files fit in buffer cache. This parameter can > be set in the running kernel using kdbx. > > # kdbx -k /vmunix /dev/mem > dbx version 3.11.1 > Type 'help' for help. > > stopped at [thread_block:1458 ,0xfffffc00002dc110] > (kdbx) p delay_wbuffers > 0 > (kdbx) a delay_wbuffers=1 > 1 > (kdbx) p delay_wbuffers > 1 > (kdbx) q > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-08-27 3:23 Peter Espen ` (5 preceding siblings ...) 1993-08-27 22:29 ` Dirk Grunwald @ 1993-08-28 15:35 ` Roland Meier 1993-08-29 16:54 ` Dirk Grunwald 6 siblings, 1 reply; 17+ messages in thread From: Roland Meier @ 1993-08-28 15:35 UTC (permalink / raw) Peter Espen (espen@unm.edu) wrote: : 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? Peter, I tried your program on a 3000/400 (RZ26s) with OSF/1 V1.3, it took 42.33s. Very slow, indeed. By default, OSF/1 and ULTRIX force flushing of dirty buffers to disk before they can be accessed again. This is different to most of our competitors UNIXes which seem to flush only if either the buffercache gets full or the update deamon forces a sync which flushes all dirty buffers at once. The reasoning behind this is a lower risk of data loss due to crash/powerfail prior to next sync, so its an integrity vs. speed tradeoff. Now lets come back to your program. I observed about 65-70 IO/s, which is near the physical limit of the disk. About 650 KB/s were transferred, which is normal when taking the IO rate and the small transfer size into account. What you have expected is probably an elapsed time in the 1-2 second range. There are two methods to achieve that. OSF/1 V1.3 has a new filesystem (AdvFS - DEC advanced filesystem) as an option but at *no* additional cost since the license is bundled with the OS. Running your program with this filesystem lead to an elapsed time of about 1s without compromising data integrity in case of a system failure. The second method is to alter the buffercache behaviour such that it works as on our competitors systems. As root, do a $ dbx -k /vmunix /dev/mem (dbx) assign delay_wbuffers=1 (dbx) quit quit the root shell and run your program. On the hardware mentioned above, I've measured a runtime of about 0.6s. Be aware, that this modification is only effective till the next reboot. To make it permanent, use dbx's patch command instead of assign (same syntax). Remember to re-apply that modification if you build a new kernel. On ULTRIX, this parameter can be modified more easily by editing /usr/sys/conf/mips/param.c. Hopefully, the next OSF/1 version will offer that capability too (/usr/sys/conf/param.c). Regards, Roland -- ======================================================================== Digital Equipment GmbH Roland Meier Regional Support @HBF, Hamburg, Federal Republic of Germany Kieler Strasse 103 DTN *771-1215 D-2000 Hamburg 50 Pub.Tel. 49-40-85361-215 ======================================================================== VAXmail : hamul3::roland Internet : roland@hamul3.enet.dec.com AllInOne : Roland Meier @HBF ======================================================================== ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-08-28 15:35 ` Roland Meier @ 1993-08-29 16:54 ` Dirk Grunwald 1993-08-31 12:35 ` Jari Tavi 0 siblings, 1 reply; 17+ messages in thread From: Dirk Grunwald @ 1993-08-29 16:54 UTC (permalink / raw) >>>>> On 28 Aug 1993 15:35:03 GMT, roland@hamul3.hbf.dec.com (Roland Meier) said: RM> What you have expected is probably an elapsed time in the 1-2 RM> second range. There are two methods to achieve that. OSF/1 V1.3 RM> has a new filesystem (AdvFS - DEC advanced filesystem) as an RM> option but at *no* additional cost since the license is bundled RM> with the OS. Running your program with this filesystem lead to an RM> elapsed time of about 1s without compromising data integrity in RM> case of a system failure. --- Where can one find out more about the DEC Advanced File System? I assume standard tools (dump/restore) can be used to backup such file systems? Is there any reason to *not* use this filesystem? Are there any other advantages, other than faster random I/O times? ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-08-29 16:54 ` Dirk Grunwald @ 1993-08-31 12:35 ` Jari Tavi 1993-09-02 3:35 ` Thor Lancelot Simon 0 siblings, 1 reply; 17+ messages in thread From: Jari Tavi @ 1993-08-31 12:35 UTC (permalink / raw) Due crossposting of this with different Subject to other Newsgroup I didn't notice this topic here: >Where can one find out more about the DEC Advanced File System? I >assume standard tools (dump/restore) can be used to backup such file >systems? AdvFS (Advanced File System) comes with DEC OSF/1 V1.3 distribution. Some features of AdvFS are: For free with DEC OSF/1: - log based file system - no need for fsck - fast recovery from errors (powerfail, crashes etc.), typically less than 10s in all cases - dump/restore interface for back up needs (extended dump/restore) With Advanced File System Utilities License: - system management command set - large volume sets (can be set up as single or multiple "partitions") - multiple partitions over volume set - migrating files over selected volumes - monitoring and control commands for file migration and fragmentation - dynamic partition/file set/volume set growing by adding new volumes - adding/removing devices from set "on the fly" - file level striping - on line backups via cloning - undelete of deleted files There's some new terminology compared to std. UFS, but in general AdvFS frees you from partition size and growth limitations of UFS. You build a file domain from one or more disk volumes, and then you create one or more filesets under that domain. Later you can dynamically add/remove physical disks to/from that domain and also you can restrict fileset diskusage with quotas etc. Filesets act as "replacement" of partition. Personally I've found AdvFS easy to use and VERY useful in environments needing dynamic partitioning and using large number of volumes. Also I've personally strongly recommended usage of AdvFS in environments where customer is using High Availability solutions like DECwatchdog/Autopilot. Only drawback I can recall right now, is that AdvFS doesn't support root partition YET. IMHO: AdvFS also helps in system management. Software Product Description (SPD) gives more details. SPD number is #44.52.00 and can be found either from gatekeeper.dec.com:pub/DEC/DECinfo/SPD/ or by asking your local Sales Rep to provide it. Also SPD of DEC OSF/1 V1.3 might be interesting (#41.61.03). Gatekeeper doesn't necessarily have all the latest SPD's on line yet... -jari -- ------------------------------------------------------------------------------- Full-Name: Jari Tavi Organization: DEC Finland Dept: DS/OSG Tel: +358-0-434 5252 Fax: +358-0-452 1392 E-mail: jpt@rixrax.enet.dec.com Address: Digital Equipment Corporation Oy PL 16 02201 Espoo FINLAND ------------------------------------------------------------------------------- * All opinions are my personal, and do not necessarily represent opinions of * my employer! ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Our DEC Alpha is the slowest on this code .... 1993-08-31 12:35 ` Jari Tavi @ 1993-09-02 3:35 ` Thor Lancelot Simon 0 siblings, 0 replies; 17+ messages in thread From: Thor Lancelot Simon @ 1993-09-02 3:35 UTC (permalink / raw) In article <25vgis$7e1@manala.fno.dec.com>, Jari Tavi <jpt@rixrax.fno.dec.com> wrote: > >Due crossposting of this with different Subject to other Newsgroup I didn't >notice this topic here: > >>Where can one find out more about the DEC Advanced File System? I >>assume standard tools (dump/restore) can be used to backup such file >>systems? > >AdvFS (Advanced File System) comes with DEC OSF/1 V1.3 distribution. > >Some features of AdvFS are: > >For free with DEC OSF/1: > - log based file system > - no need for fsck > - fast recovery from errors (powerfail, crashes etc.), > typically less than 10s in all cases > - dump/restore interface for back up needs (extended dump/restore) > > >With Advanced File System Utilities License: > - system management command set > - large volume sets (can be set up as single or multiple "partitions") > - multiple partitions over volume set > - migrating files over selected volumes > - monitoring and control commands for file migration and fragmentation > - dynamic partition/file set/volume set growing by adding new volumes > - adding/removing devices from set "on the fly" > - file level striping > - on line backups via cloning > - undelete of deleted files > > There's some new terminology compared to std. UFS, but in general > AdvFS frees you from partition size and growth limitations of UFS. > You build a file domain from one or more disk volumes, and then > you create one or more filesets under that domain. Later you can > dynamically add/remove physical disks to/from that domain > and also you can restrict fileset diskusage with quotas etc. > Filesets act as "replacement" of partition. Personally I've found > AdvFS easy to use and VERY useful in environments needing dynamic > partitioning and using large number of volumes. Also I've personally > strongly recommended usage of AdvFS in environments where customer > is using High Availability solutions like DECwatchdog/Autopilot. Only > drawback I can recall right now, is that AdvFS doesn't support root > partition YET. IMHO: AdvFS also helps in system management. I remember reading one of the Sprite papers from beta.xerox.com which I believe was a proposal to port Sprite LFS to reference OSF/1. Is this the result of that project, or a separate development? (Obviously most any log-based filesystem owes _some_ debt to Sprite -- but how much?) -- Thor Lancelot Simon tls@panix.COM When you're not feeling holy, your loneliness says that you've sinned... ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~1993-09-08 18:10 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 1993-09-07 12:44 Our DEC Alpha is the slowest on this code 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. -- strict thread matches above, loose matches on Subject: below -- 1993-08-27 3:23 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-08-27 22:29 ` 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