On Wed, Aug 18, 1999 at 12:18:05PM -0400, James Manning wrote:
> >                   input      output     random
> >                 MB/s  %cpu MB/s  %cpu   /s   %cpu
> > 
> > 1drive-jbod     19.45 16.3 17.99 16.4 153.90 4.0
> > raid0           48.49 42.1 25.48 23.1 431.00 7.4
> > raid01          53.23 41.4 21.22 19.0 313.10 9.5
> > raid5           52.47 39.3 21.35 19.8 365.60 11.2
> > raid5-degraded  20.23 15.5 21.86 20.3 277.90 7.8
> 
> So in most cases you wrote data much faster than writing it?
> Or am I misinterpreting your table?

In most cases I can read data much faster than I can write it.

> > I hacked my copy of bonnie in two ways: to skip the per-char tests,
> > which I'm not interested in, and to call fdatasync() after each write
> > test (but that change didn't really make much difference).  I use
> > an awk script to pick the best results from multiple runs, and to
> > convert KB/s to MB/s.
> 
> Sounds quite useful :) willing to put it somewhere?

Yeah, but the changes are really quite trivial.
I'll attach the patch to Bonnie and the awk script
for picking the best results to this message
(just run bonnie several times with the same params and pipe
into the awk script).

> Stripe and Segment size hasn't made any difference in performance for me.

I saw very small changes when I tried a few settings other than the default.
 
> As soon as my shipment of more 1164P's come in, I'll be spreading the
> drives across many more channels.  My 20 drives over 2 channels numbers
> equalling my 10 drives over 2 channels sure indicate to do so :)

Or, as I say, it might indicate the mylex or driver is maxed out.

Jan Edler
--- Bonnie.c.unhacked   Wed Aug 28 12:23:49 1996
+++ Bonnie.c    Fri Aug  6 13:41:27 1999
@@ -148,6 +148,7 @@
   size = Chunk * (size / Chunk);
   fprintf(stderr, "File '%s', size: %ld\n", name, size);
 
+#if UNHACKED_VERSION
   /* Fill up a file, writing it a char at a time with the stdio putc() call */
   fprintf(stderr, "Writing with putc()...");
   newfile(name, &fd, &stream, 1);
@@ -160,6 +161,8 @@
    * note that we always close the file before measuring time, in an
    *  effort to force as much of the I/O out as we can
    */
+  if (fdatasync(fd) < 0)
+    io_error("fdatasync after putc");
   if (fclose(stream) == -1)
     io_error("fclose after putc");
   get_delta_t(Putc);
@@ -186,10 +189,13 @@
     if ((words = read(fd, (char *) buf, Chunk)) == -1)
       io_error("rwrite read");
   } /* while we can read a block */
+  if (fdatasync(fd) < 0)
+    io_error("fdatasync after rewrite");
   if (close(fd) == -1)
     io_error("close after rewrite");
   get_delta_t(ReWrite);
   fprintf(stderr, "done\n");
+#endif /* UNHACKED_VERSION */
 
   /* Write the whole file from scratch, again, with block I/O */
   newfile(name, &fd, &stream, 1);
@@ -205,11 +211,14 @@
     if (write(fd, (char *) buf, Chunk) == -1)
       io_error("write(2)");
   } /* for each word */
+  if (fdatasync(fd) < 0)
+    io_error("fdatasync after fast write");
   if (close(fd) == -1)
     io_error("close after fast write");
   get_delta_t(FastWrite);
   fprintf(stderr, "done\n");
 
+#if UNHACKED_VERSION
   /* read them all back with getc() */
   newfile(name, &fd, &stream, 0);
   for (words = 0; words < 256; words++)
@@ -232,6 +241,7 @@
   /* use the frequency count */
   for (words = 0; words < 256; words++)
     sprintf((char *) buf, "%d", chars[words]);
+#endif /* UNHACKED_VERSION */
 
   /* Now suck it in, Chunk at a time, as fast as we can */
   newfile(name, &fd, &stream, 0);
@@ -308,6 +318,8 @@
        if (read(seek_control[0], seek_tickets, 1) != 1)
          io_error("read ticket");
       } /* until Mom says stop */
+      if (fdatasync(fd) < 0)
+        io_error("fdatasync after seek");
       if (close(fd) == -1)
         io_error("close after seek");
 
@@ -382,15 +394,27 @@
 
   printf("<TR><TD>%s</TD><TD>%d</TD>", machine, size / (1024 * 1024));
   
printf("<TD>%d</TD><TD>%4.1f</TD><TD>%d</TD><TD>%4.1f</TD><TD>%d</TD><TD>%4.1f</TD>",
+#if UNHACKED_VERSION
     (int) (((double) size) / (delta[(int) Putc][Elapsed] * 1024.0)),
     delta[(int) Putc][CPU] / delta[(int) Putc][Elapsed] * 100.0,
+#else
+    0, 0.0,
+#endif
     (int) (((double) size) / (delta[(int) FastWrite][Elapsed] * 1024.0)),
     delta[(int) FastWrite][CPU] / delta[(int) FastWrite][Elapsed] * 100.0,
+#if UNHACKED_VERSION
     (int) (((double) size) / (delta[(int) ReWrite][Elapsed] * 1024.0)),
     delta[(int) ReWrite][CPU] / delta[(int) ReWrite][Elapsed] * 100.0);
+#else
+    0, 0.0);
+#endif
   printf("<TD>%d</TD><TD>%4.1f</TD><TD>%d</TD><TD>%4.1f</TD>",
+#if UNHACKED_VERSION
     (int) (((double) size) / (delta[(int) Getc][Elapsed] * 1024.0)),
     delta[(int) Getc][CPU] / delta[(int) Getc][Elapsed] * 100.0,
+#else
+    0, 0.0,
+#endif
     (int) (((double) size) / (delta[(int) FastRead][Elapsed] * 1024.0)),
     delta[(int) FastRead][CPU] / delta[(int) FastRead][Elapsed] * 100.0);
   printf("<TD>%5.1f</TD><TD>%4.1f</TD></TR>\n",
@@ -415,15 +439,27 @@
 
   printf("%-8.8s %4d ", machine, size / (1024 * 1024));
   printf("%5d %4.1f %5d %4.1f %5d %4.1f ",
+#if UNHACKED_VERSION
     (int) (((double) size) / (delta[(int) Putc][Elapsed] * 1024.0)),
     delta[(int) Putc][CPU] / delta[(int) Putc][Elapsed] * 100.0,
+#else
+    0, 0.0,
+#endif
     (int) (((double) size) / (delta[(int) FastWrite][Elapsed] * 1024.0)),
     delta[(int) FastWrite][CPU] / delta[(int) FastWrite][Elapsed] * 100.0,
+#if UNHACKED_VERSION
     (int) (((double) size) / (delta[(int) ReWrite][Elapsed] * 1024.0)),
     delta[(int) ReWrite][CPU] / delta[(int) ReWrite][Elapsed] * 100.0);
+#else
+    0, 0.0);
+#endif
   printf("%5d %4.1f %5d %4.1f ",
+#if UNHACKED_VERSION
     (int) (((double) size) / (delta[(int) Getc][Elapsed] * 1024.0)),
     delta[(int) Getc][CPU] / delta[(int) Getc][Elapsed] * 100.0,
+#else
+    0, 0.0,
+#endif
     (int) (((double) size) / (delta[(int) FastRead][Elapsed] * 1024.0)),
     delta[(int) FastRead][CPU] / delta[(int) FastRead][Elapsed] * 100.0);
   printf("%5.1f %4.1f\n",
#!/usr/bin/gawk -f

# pluck out the best values for each of sequential block read, write,
# and random seeks from bonnie output.  Also convert KB/s to MB/s.

BEGIN {
        biggest_r = 0;  # biggest seq read value
        chosen_rc = 0;  # chosen seq read cpu %
        biggest_w = 0;  # chosen seq write
        chosen_wc = 0;  # chosen seq write cpu %
        biggest_s = 0;  # chosen seeks
        chosen_sc = 0;  # chosen seeks cpu %
        chosen_name = ""; # chosen name
}
/Sequential/ { next; }
/Block/ { next; }
/Machine/ { next; }
{
        if ($11 > biggest_r) {
                biggest_r = $11;
                chosen_rc = $12;
                chosen_name = $1;
        }
        if ($5 > biggest_w) {
                biggest_w = $5;
                chosen_wc = $6;
        }
        if ($13 > biggest_s) {
                biggest_s = $13;
                chosen_sc = $14;
        }
}
END {
        printf ("%s     %.2f %.1f %.2f %.1f %.1f %.1f\n",
                chosen_name, biggest_r/1024, chosen_rc,
                biggest_w/1024, chosen_wc, biggest_s, chosen_sc);
}

Reply via email to