Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Matthew Eaton <m.eaton82@gmail.com>, fio@vger.kernel.org
Subject: Re: Bug with --buffer_compress_percentage
Date: Mon, 23 Nov 2015 09:08:49 -0700	[thread overview]
Message-ID: <56533A11.4050706@kernel.dk> (raw)
In-Reply-To: <CAF+0mvmGOrVdpaobMa-ChSz2qPJqhE1s+qUbJpdHPpEo+UKcww@mail.gmail.com>

On 11/20/2015 10:29 AM, Matthew Eaton wrote:
> I noticed that sometimes using --buffer_compress_percentage would not
> result in the desired compression.  After running some tests I found
> that only some block sizes are affected.
>
> 512b, 4K, 8K, 16K, and 32K seem to work as expected.
>
> 64K, 128K, 256K, 512K, and 1024K exhibited the bug.  I have not tested
> beyond 1024K.
>
> Here is the test script I used only changing block size for each test.
>
> for i in {0..100}; do
>    fio --name=test --rw=write --bs=128k --ioengine=libaio --direct=1
> --iodepth=32 --size=512m --refill_buffers
> --buffer_compress_percentage=$i --filename=testfile.$i --eta=never
> --output=/dev/null
> done
>
> for i in {0..100}; do
>    gzip -v testfile.$i &>> gzip.txt
> done
>
> rm *.gz
>
> Below are compression results for 4K and then 128K.  For 128K, you can
> see compression stops matching at around 50%.

I think this is an artifact of how gzip compression works, it doesn't 
have an unlimited size window. It's 32k, iirc. Fio should fill so that 
it ideally would compress to the given size with an ideal compression 
algorithm.

You'd probably want to use buffer_compress_chunk=x to always force fio 
to operate in sizes of that for compression, if you want to ensure that 
gzip would be able to compress to the specified ratio. I do think we 
have a loop missing though for that to do what you need, let me test 
that and report back.

-- 
Jens Axboe



  parent reply	other threads:[~2015-11-23 16:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 17:29 Bug with --buffer_compress_percentage Matthew Eaton
2015-11-20 17:33 ` Matthew Eaton
2015-11-23 16:08 ` Jens Axboe [this message]
2015-11-23 16:16   ` Jens Axboe
2015-11-23 22:15     ` Matthew Eaton
2015-11-24  3:13       ` Jens Axboe
2015-11-25 17:16         ` Matthew Eaton
2015-11-25 17:29           ` Jens Axboe
2015-11-26  0:55             ` Matthew Eaton
2015-11-26  4:26               ` Jens Axboe
2015-11-30 21:17                 ` Matthew Eaton
2015-11-30 21:20                   ` Jens Axboe
2015-11-30 21:30                     ` Jens Axboe
2015-11-30 22:02                       ` Matthew Eaton

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=56533A11.4050706@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=m.eaton82@gmail.com \
    /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