From: clarsen@intruder.lbl.gov (Case Larsen)
Subject: Re: Fast File System?
Date: 1 Jun 1994 17:05:32 GMT [thread overview]
Message-ID: <2sif4s$l2d@overload.lbl.gov> (raw)
In-Reply-To: 2rhphmINNhqe@usenet.pa.dec.com
In article <2rhphmINNhqe@usenet.pa.dec.com>,
Burkhard Neidecker-Lutz <neideck@nestvx.enet.dec.com> wrote:
>>My question: Does AdvFS perform faster than UFS for local traffic? NFS?
>>
>
>AdvFS is much faster for metadata operations (creation and deletion of
>files). AdvFS can be slightly slower for some normal operations, but
>mostly it's a wash. AdvFS can be much faster for large files when
>it's builtin striping facilities are used.
Could you run this on AdvFS and tell me what output you get? I'm going
to release this and a bunch of figures to comp.benchmarks soon. I'd
be interested to see how AdvFS fits in.
Do:
cc -O creattest.c -o creattest
./creattest 0 8000
./creattest 1024 8000
./creattest 2048 8000
./creattest 4096 8000
./creattest 8192 8000
./creattest 16384 8000
./creattest 65536 8000
./creattest 131072 8000
creattest.c:
#ifndef lint
static char vcid[] = "$Id: creattest.c,v 1.1 1994/05/18 09:14:47 clarsen\
Exp clarsen $";
/*
* $Log: creattest.c,v $
* Revision 1.1 1994/05/18 09:14:47 clarsen
* Initial revision
*
*/
#endif /* lint */
#include <sys/types.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/file.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#define N 1000
#define BUFLEN 8192
main(argc,argv)
int argc;
char *argv[];
{
int i;
struct timeval start, end;
char *buf;
int size = atoi(argv[1]);
int n_files = atoi(argv[2]);
if (size>0) {
buf = malloc(BUFLEN);
}
system ("mkdir creat");
gettimeofday (&start,NULL);
for (i = 0; i < n_files; i++) {
char a[36];
struct stat stb;
int fd, n;
sprintf (a,"creat/%d",i);
fd = open(a,O_RDWR|O_CREAT,0644);
/* Slow on linux. NOOP on other machines */
/* fstat(fd,&stb);*/
if (size > 0) {
for (n = size; n >0; n-=BUFLEN) {
write(fd, buf,n > BUFLEN? BUFLEN : n);
}
}
close(fd);
}
gettimeofday(&end,NULL);
system ("rm -rf creat");
{
double t;
t = (end.tv_sec-start.tv_sec)+(end.tv_usec-start.tv_usec)/1000000.0;
printf ("%d byte/files:%d files:%f files/second:%f seconds\n",
size,n_files,n_files/t,t);
}
exit(0);
}
-Case Larsen
ctlarsen@lbl.gov
next prev parent reply other threads:[~1994-06-01 17:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-05-19 19:20 Fast File System? System Janitor
1994-05-19 20:33 ` Brian 'Doc' O'Neill
1994-05-20 7:40 ` Burkhard Neidecker-Lutz
1994-06-01 17:05 ` Case Larsen [this message]
1994-05-19 22:53 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
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