All of lore.kernel.org
 help / color / mirror / Atom feed
* fio always writes null bytes whatever I do
@ 2015-03-12 14:32 Urs Schaltegger
  2015-03-12 21:05 ` Matthew Eaton
  2015-03-17 21:56 ` Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Urs Schaltegger @ 2015-03-12 14:32 UTC (permalink / raw)
  To: fio@vger.kernel.org

fio always writes null bytes whatever I do. I need random data to avoid interference of deduplication solutions (within SSDs or using ZFS).

Windows 8.1 Enterprise x64

fio-2.2.6 (also tried 2.2.0/2.2.1/2.2.3)

fio --section=fiorandom --runtime=60 <FIOFile>

<FIOFile>:

[global]
ioengine=windowsaio
thread
group_reporting
time_based
clocksource=clock_gettime
direct=1
refill_buffers
size=1g
[fiorandom]
readwrite=randwrite
numjobs=4
iodepth=1
blocksize=8k
directory=D\:\



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fio always writes null bytes whatever I do
  2015-03-12 14:32 fio always writes null bytes whatever I do Urs Schaltegger
@ 2015-03-12 21:05 ` Matthew Eaton
  2015-03-17 21:56 ` Jens Axboe
  1 sibling, 0 replies; 4+ messages in thread
From: Matthew Eaton @ 2015-03-12 21:05 UTC (permalink / raw)
  To: Urs Schaltegger; +Cc: fio@vger.kernel.org

On Thu, Mar 12, 2015 at 7:32 AM, Urs Schaltegger
<urs.schaltegger@itsystems.ch> wrote:
> fio always writes null bytes whatever I do. I need random data to avoid interference of deduplication solutions (within SSDs or using ZFS).
>
> Windows 8.1 Enterprise x64
>
> fio-2.2.6 (also tried 2.2.0/2.2.1/2.2.3)
>
> fio --section=fiorandom --runtime=60 <FIOFile>
>
> <FIOFile>:
>
> [global]
> ioengine=windowsaio
> thread
> group_reporting
> time_based
> clocksource=clock_gettime
> direct=1
> refill_buffers
> size=1g
> [fiorandom]
> readwrite=randwrite
> numjobs=4
> iodepth=1
> blocksize=8k
> directory=D\:\

Confirmed here as well...

matt@matt-work:~$ fio --name=test --filename=/tmp/fio.temp.file
--size=1g --rw=write --refill_buffers
test: (g=0): rw=write, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
fio-2.2.6
Starting 1 process
test: Laying out IO file(s) (1 file(s) / 1024MB)
Jobs: 1 (f=1): [W(1)] [-.-% done] [0KB/289.7MB/0KB /s] [0/74.0K/0
iops] [eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=7629: Thu Mar 12 14:02:39 2015
  write: io=1024.0MB, bw=537456KB/s, iops=134363, runt=  1951msec
    clat (usec): min=1, max=7014, avg= 7.03, stdev=198.60
     lat (usec): min=1, max=7014, avg= 7.07, stdev=198.60
    clat percentiles (usec):
     |  1.00th=[    1],  5.00th=[    1], 10.00th=[    1], 20.00th=[    1],
     | 30.00th=[    1], 40.00th=[    1], 50.00th=[    1], 60.00th=[    1],
     | 70.00th=[    2], 80.00th=[    2], 90.00th=[    2], 95.00th=[    2],
     | 99.00th=[    3], 99.50th=[    4], 99.90th=[   19], 99.95th=[ 6944],
     | 99.99th=[ 6944]
    bw (KB  /s): min=294634, max=1233526, per=100.00%, avg=608053.33,
stdev=541675.65
    lat (usec) : 2=69.53%, 4=29.89%, 10=0.35%, 20=0.14%, 50=0.01%
    lat (msec) : 10=0.08%
  cpu          : usr=5.33%, sys=18.45%, ctx=222, majf=0, minf=8
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued    : total=r=0/w=262144/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
  WRITE: io=1024.0MB, aggrb=537455KB/s, minb=537455KB/s,
maxb=537455KB/s, mint=1951msec, maxt=1951msec

Disk stats (read/write):
  sda: ios=0/897, merge=0/7, ticks=0/230372, in_queue=250416, util=87.64%
matt@matt-work:~$ hexdump /tmp/fio.temp.file
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
40000000

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: fio always writes null bytes whatever I do
  2015-03-12 14:32 fio always writes null bytes whatever I do Urs Schaltegger
  2015-03-12 21:05 ` Matthew Eaton
@ 2015-03-17 21:56 ` Jens Axboe
  2015-04-04  2:41   ` Elliott, Robert (Server Storage)
  1 sibling, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2015-03-17 21:56 UTC (permalink / raw)
  To: Urs Schaltegger, fio@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

On 03/12/2015 08:32 AM, Urs Schaltegger wrote:
> fio always writes null bytes whatever I do. I need random data to avoid interference of deduplication solutions (within SSDs or using ZFS).
>
> Windows 8.1 Enterprise x64
>
> fio-2.2.6 (also tried 2.2.0/2.2.1/2.2.3)
>
> fio --section=fiorandom --runtime=60 <FIOFile>
>
> <FIOFile>:
>
> [global]
> ioengine=windowsaio
> thread
> group_reporting
> time_based
> clocksource=clock_gettime
> direct=1
> refill_buffers
> size=1g
> [fiorandom]
> readwrite=randwrite
> numjobs=4
> iodepth=1
> blocksize=8k
> directory=D\:\

Hmm yes, that looks like a regression. Does the attached work?


-- 
Jens Axboe


[-- Attachment #2: randfill.patch --]
[-- Type: text/x-patch, Size: 465 bytes --]

diff --git a/io_u.c b/io_u.c
index 6567e10a5be2..33b8ac347437 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1895,8 +1895,13 @@ void fill_io_buffer(struct thread_data *td, void *buf, unsigned int min_write,
 		} while (left);
 	} else if (o->buffer_pattern_bytes)
 		fill_buffer_pattern(td, buf, max_bs);
-	else
+	else if (o->zero_buffers)
 		memset(buf, 0, max_bs);
+	else {
+		struct frand_state *rs = get_buf_state(td);
+
+		fill_random_buf(rs, buf, max_bs);
+	}
 }
 
 /*

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: fio always writes null bytes whatever I do
  2015-03-17 21:56 ` Jens Axboe
@ 2015-04-04  2:41   ` Elliott, Robert (Server Storage)
  0 siblings, 0 replies; 4+ messages in thread
From: Elliott, Robert (Server Storage) @ 2015-04-04  2:41 UTC (permalink / raw)
  To: Jens Axboe, Urs Schaltegger, fio@vger.kernel.org



> -----Original Message-----
> From: fio-owner@vger.kernel.org [mailto:fio-owner@vger.kernel.org] On
> Behalf Of Jens Axboe
> Sent: Tuesday, March 17, 2015 4:56 PM
> To: Urs Schaltegger; fio@vger.kernel.org
> Subject: Re: fio always writes null bytes whatever I do
> 
> On 03/12/2015 08:32 AM, Urs Schaltegger wrote:
> > fio always writes null bytes whatever I do. I need random data to avoid
> interference of deduplication solutions (within SSDs or using ZFS).
> >
...
> 
> Hmm yes, that looks like a regression. Does the attached work?
> 
> 
> --
> Jens Axboe

With this change, fio now defaults to spending a lot of
time during writes in:
	get_io_u -> small_content_scramble (inlined)

For example, doing writes to a pmem device, perf top shows
the CPU time as:
* 67% pmem memcpy 
* 21% fio get_io_u 

That disappears if you add
	zero_buffers
since the initialization only happens once:
* 89% pmem memcpy
* ...
* 0.02% fio get_io_u

but that means a zero pattern is used, which may be
too easy for some deduplicating storage devices to
handle.

---
Robert Elliott, HP Server Storage




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-04  2:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-12 14:32 fio always writes null bytes whatever I do Urs Schaltegger
2015-03-12 21:05 ` Matthew Eaton
2015-03-17 21:56 ` Jens Axboe
2015-04-04  2:41   ` Elliott, Robert (Server Storage)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.