From: Chris Samuel <chris@csamuel.org>
To: linux-btrfs@vger.kernel.org
Subject: Re: Compressed Filesystem
Date: Tue, 4 Nov 2008 11:08:48 +1100 [thread overview]
Message-ID: <200811041108.51460.chris@csamuel.org> (raw)
In-Reply-To: <1225310922.6448.300.camel@think.oraclecorp.com>
[-- Attachment #1.1: Type: text/plain, Size: 886 bytes --]
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
[-- Attachment #1.2: bonnie++-1.03a-urand.patch --]
[-- Type: text/x-patch, Size: 1422 bytes --]
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 481 bytes --]
next prev parent reply other threads:[~2008-11-04 0:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 14:54 Compressed Filesystem Lee Trager
2008-10-28 15:47 ` Chris Mason
2008-10-28 16:33 ` Lee Trager
2008-10-28 17:38 ` Chris Mason
2008-10-28 17:40 ` Zach Brown
2008-10-28 17:46 ` Chris Mason
[not found] ` <53696.2001:470:e828:1::2:2.1225304096.squirrel@avalon.arbitraryconstant.com>
2008-10-29 20:08 ` Chris Mason
2008-11-04 0:08 ` Chris Samuel [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-12-15 22:14 devzero
2008-12-15 23:07 ` Lee Trager
2008-12-15 23:19 devzero
2008-12-16 15:20 ` Lee Trager
2008-12-16 15:26 ` Chris Mason
2008-12-16 16:25 ` Lee Trager
2008-12-16 19:45 ` Roland
2008-12-18 15:55 ` Chris Mason
2008-12-16 18:14 devzero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200811041108.51460.chris@csamuel.org \
--to=chris@csamuel.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox