Coda File System

Re: Re: /coda: Input/output error

From: Torsten Foertsch <torsten.foertsch_at_gmx.net>
Date: Fri, 27 Aug 1999 00:30:38 +0200 (MEST)
hi,

I have 2 questions.

(1) Is there any way to avoid the venus cache overrun. I have tried 'cfs
strong', 'venus -cf 10240 -c 102400 -vdds 300000000 -vlds 30000000'.

I thought I make the cache large enough to hold the entire /usr filesystem
(ca. 300MB). This blowed up the venus client to 350 MB RAM but the problem
still happens.

(2) Sometimes I get 'ls: ...: Connection timed out'. I tried 'cfs
waitforever'. Yes, it waits forever. This timeout happens also on readonly access.
If I cannot avoid this I can't use coda for my servers. 

Now I have a 'Local inconsistent object at /coda/bin' after such a
connection timeout. How can I repair it?

I have written a perl script to stress a filesystem. Are you interested
in? Coda is about 2-3 times slower than an ext2fs. This is a good result I
think.

Torsten

---perl---
#!/usr/bin/perl

# stress.pl <directory> <MB_to_read> <from_approx_that_number_of_files>
# This script reads <MB_to_read> Megabytes from files from the directory
tree
# that begins with <directory>. It assumes that there are some files that 
# are accessed more often than other. The 3 parameter gives a hint how
many
# different files should be accessed.

use strict;

my $log=0;

srand time ^ ($$+($$<<15));

#system "cfs flushcache";

my @files=`find $ARGV[0] -type f -print`;

my $amount=$ARGV[1]*1024*1024; # MB

sub magic {
  my ($x, $s, $m)=@_;
  if( 0<$x && $x<=0.5 ) {
    return -log(2*$x)*$s+$m;
  } elsif( 0.5<$x && $x<1 ) {
    return log(2*(1-$x))*$s+$m;
  } else {
    return 0;
  }
}

my $varianz=$ARGV[2]/15;

my @a;

for( my $i=0; $i<2*$#files; $i++ ) {
  $a[$i]=$files[int(rand( $#files ))];
  chomp $a[$i];
}

my $starttime=time;

my %h=();

my ($len, $read, $rbuf);
for( $read=0; $read<$amount; $read+=$len ) {
  local *F;
  my $s=int( magic( rand, $varianz, $#a/2 ) );
  $s=0 if( $s<0 );
  $s=$#a if( $s>$#a );
  my @stat=stat $a[$s] or die "ERROR: Stat $a[$s]: $!\n";
  $len=$stat[7];

  open F, "<".$a[$s] or do {
    warn "WARNING: Cannot open $a[$s]: $!\n";
    $len=0;
    next;
  };
  read F, $rbuf, $len;
  close F;

  $h{$a[$s]}=[0, 0] unless( exists $h{$a[$s]} );
  $h{$a[$s]}->[0]++;
  $h{$a[$s]}->[1]+=$len;
}

my $endtime=time;

print "read $read bytes from ", scalar(keys %h), " files:\n";
if( $log ) {
  print "Count\tBytes\tFile\n";
  foreach (sort {$h{$b}->[0]<=>$h{$a}->[0]} keys %h) {
    print $h{$_}->[0], "\t", $h{$_}->[1], "\t", $_, "\n";
  }
}

print "elapsed amount of time: ", $endtime-$starttime, "sec.\n";

-- 
Sent through Global Message Exchange - http://www.gmx.net
Received on 1999-08-26 18:31:39