All of lore.kernel.org
 help / color / mirror / Atom feed
* random writes with different patterns
@ 2016-04-08 20:01 Foley, Robert
  2016-04-09  5:04 ` Sitsofe Wheeler
       [not found] ` <CALjAwximeyPand181Q71B9f0CJgXcFHNGTBheTk2MGQkaf5+dQ@mail.gmail.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Foley, Robert @ 2016-04-08 20:01 UTC (permalink / raw)
  To: fio

Hello all,
We use fio and it more than meets our needs in the majority of cases.  There is one use case where we would like to write to randomly selected blocks with one data pattern, and then overwrite that same set of blocks with a different data pattern.  We did not find the fio parameters that would allow this.

Our use case is one where we initially write randomly to a portion of a test area. Here is an example of our job file parameters:
verify=crc32c 
rw=randwrite
bs=4k
size=128G
io_size=32M 
randseed=42

Our understanding is that this job allows us to write 32 meg of data to random areas in the 128 gig region.  Since we are using randseed, this allows us to later use a read job to verify the data on these random blocks.

Suppose at time A we wrote out a pattern using the parameters above.  Later at time B we would like to write the same blocks (offsets) of the test area but with a different pattern of data bytes.  Our understanding is that randseed will seed the generation of both a) the pattern of I/O blocks that we generate as well as b) the pattern of data in the buffers we are writing.  In other words since the randseed controls both a) and b), there is no way for us to get a different data pattern written to the same pattern of blocks (offsets).

Does anyone know how to accomplish this with fio?

We had some ideas around how to solve this if it is not currently supported.   It might be useful to have an optional "verify_io_stamp" parameter, which would specify a simple 32 or 64 bit integer that could get added to and verified with the verify_header.  

At time A in the example above, the job would specify one value for the verify_io_stamp (A)  and at time B the job would specify a different value (B).  Since reads would verify the verify_io_stamp in the header, we could distinguish between the (A) and the (B) data and solve the use case we mentioned above.

Another benefit of this verify_io_stamp is that if we ever received incorrect data, it might help us find out from which point that data was.  So for example if we wrote with a different verify_io_stamp at times A, B, and C, and we received data pattern "A" at time "C" then it would give us potentially valuable information about the failure, which might help us to debug it faster.  

Does this seem useful to you?  We are willing to contribute this if it seems beneficial to the community. 

Thank You !
-Rob Foley



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

end of thread, other threads:[~2016-04-13 20:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 20:01 random writes with different patterns Foley, Robert
2016-04-09  5:04 ` Sitsofe Wheeler
     [not found] ` <CALjAwximeyPand181Q71B9f0CJgXcFHNGTBheTk2MGQkaf5+dQ@mail.gmail.com>
2016-04-11 13:54   ` Foley, Robert
2016-04-13  5:38     ` Sitsofe Wheeler
2016-04-13 20:08       ` Foley, Robert

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.