On Thu, 30 Oct 2008 7:08:42 am Chris Mason wrote: > The decompression does spread across cpus, and I've gotten about 800MB/s > doing decompress and checksumming on a zero filled compressed file. At > the time, the disk was reading 14MB/s.
FWIW I've got a pretty ugly patch to Bonnie++ that makes it use data from /dev/urandom for writes rather than just blocks of zero's which give, um, optomistic values for throughput on filesystems that do compression. Still not particularly realistic in terms of an actual workload, but maybe just a tad less unrealistic. :-) Caveat emptor - I've not tried this since I sent it to Russell Coker in January '07. cheers, Chris -- Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC This email may come with a PGP signature as a file. Do not panic. For more info see: http://en.wikipedia.org/wiki/OpenPGP
diff -ur bonnie++-1.03a/bonnie++.cpp bonnie++-1.03a-urand/bonnie++.cpp --- bonnie++-1.03a/bonnie++.cpp 2002-12-04 00:40:35.000000000 +1100 +++ bonnie++-1.03a-urand/bonnie++.cpp 2007-01-01 13:03:41.644378000 +1100 @@ -41,6 +41,9 @@ #include <string.h> #include <sys/utsname.h> #include <signal.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> #ifdef AIX_MEM_SIZE #include <cf.h> @@ -148,6 +151,28 @@ } } +void load_random_data(char *temp_buffer,int length) +{ + int filedes, numbytes; + + filedes=open("/dev/urandom",O_RDONLY); + if(filedes<0) + { + perror("Open of /dev/urandom failed, falling back to 0's"); + memset(temp_buffer, 0, length); + } + else + { + numbytes=read(filedes,temp_buffer,length); + if(numbytes!=length) + { + perror("Read from /dev/urandom failed, falling back to 0's"); + memset(temp_buffer, 0, length); + } + close(filedes); + } +} + int main(int argc, char *argv[]) { int file_size = DefaultFileSize; @@ -477,7 +502,8 @@ return 1; globals.decrement_and_wait(FastWrite); if(!globals.quiet) fprintf(stderr, "Writing intelligently..."); - memset(buf, 0, globals.chunk_size()); + // memset(buf, 0, globals.chunk_size()); + load_random_data(buf, globals.chunk_size()); globals.timer.timestamp(); bufindex = 0; // for the number of chunks of file data
signature.asc
Description: This is a digitally signed message part.