Default buffer_compress_chunk to 512
authorJens Axboe <axboe@kernel.dk>
Tue, 31 Oct 2017 16:50:03 +0000 (10:50 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 31 Oct 2017 16:50:03 +0000 (10:50 -0600)
This makes us behave better out of the box, for the cases where
people use bigger block sizes. Without this change and if the
user set buffer_compress_percentage=50 and bs=128k, then we'd
have 64k of zeroes at the end. This is probably not what the
user expects.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
HOWTO
fio.1
options.c

diff --git a/HOWTO b/HOWTO
index e510e18c4c782a3335f6edaf29fed89799b9445c..419fa7373daef7a01f9807c03a70c27c0fbb1a5d 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -1464,7 +1464,7 @@ Buffers and memory
        followed by the remaining zeroed. With this set to some chunk size smaller
        than the block size, fio can alternate random and zeroed data throughout the
        I/O buffer. This is particularly useful when bigger block sizes are used
-       for a job.
+       for a job. Defaults to 512.
 
 .. option:: buffer_pattern=str
 
diff --git a/fio.1 b/fio.1
index 8e983724253e3738e1206d624adaf93c2a9294bd..63d32a52712e48839873109d17a45bd90b7324d2 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -1252,7 +1252,7 @@ will provide \fBbuffer_compress_percentage\fR of blocksize random data,
 followed by the remaining zeroed. With this set to some chunk size smaller
 than the block size, fio can alternate random and zeroed data throughout the
 I/O buffer. This is particularly useful when bigger block sizes are used
-for a job.
+for a job. Defaults to 512.
 .TP
 .BI buffer_pattern \fR=\fPstr
 If set, fio will fill the I/O buffers with this pattern or with the contents
index 5813a66b3b07d716f72fe2dc613b86c6be05a7db..e8d1a3abbbf931229b83845170e1f33dec2d55bf 100644 (file)
--- a/options.c
+++ b/options.c
@@ -4067,6 +4067,7 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .parent = "buffer_compress_percentage",
                .hide   = 1,
                .help   = "Size of compressible region in buffer",
+               .def    = "512",
                .interval = 256,
                .category = FIO_OPT_C_IO,
                .group  = FIO_OPT_G_IO_BUF,