答复: How to ensure split verification will generate the same configs as write phase?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> ^^^ Here's a problem - you can't randomly write and then verify sequentially via a different run. In your case you need rw=randread.
Yes. It's my fault to paste the original content of the buggy job file. I understand that rw= option should be paired with or without rand- prefix.

> The  randseed is the same across different invocations of fio unless you say otherwise (see randrepeat - http://fio.readthedocs.io/en/latest/fio_doc.html#cmdoption-arg-randrepeat
> ). So even if you weren't using a verification state file you will re-generate the same pattern if the rest of the job is the same.
Thank you for the explanation. A deep question about the seed comes:) Though randseed is the same across different invocation of fio, is it different for different sections in one job file?

I made another job file as below:
myjob.fio:
	[global] 
	bs=4k    
	direct=1 
	ioengine=sync
	verify=crc32c  
	filename=/dev/sdf
	io_size=10k

	[write-phase]  
	rw=randwrite
	do_verify=0
	write_iolog=iolog

	[verify-phase]
	stonewall
	rw=randread
	do_verify=1

I think these two sections have the same settings except the date direction. So I expect the later one can verify the write-phase. But it failed.	
run it with --debug, and found the offset generated are not the same, so verify abort with error for the first time, as below: 
	random   24382 off rand 259043585
	io       24382 fill_io_u: io_u 0x25ad740: off=71233536/len=4096/ddir=1//dev/sdf
	random   24382 off rand 3179521932
	io       24382 fill_io_u: io_u 0x25ad740: off=874364928/len=4096/ddir=1//dev/sdf
	random   24382 off rand 3621444214
	io       24382 fill_io_u: io_u 0x25ad740: off=995893248/len=4096/ddir=1//dev/sdf
	random   24388 off rand 1094293889
	io       24388 fill_io_u: io_u 0x25ad500: off=300929024/len=4096/ddir=0//dev/sdf
You can see [24382] is write-phase and [24388] is verify-phase, and the first round of them use different seed I suppose.

I search in the source code, and found the following snippet:
	static int setup_random_seeds(struct thread_data *td)
	{
	...
			for (i = 0; i < FIO_RAND_NR_OFFS; i++) {
					td->rand_seeds[i] = seed * td->thread_number + i;
					seed *= 0x9e370001UL;
			}               

Is td->thread_number different for different sections? I thought they both equal to 1 before.

Later, I realize split verify using two sections in one file is not a formal way? Is it better to just write only one write section, and use 'fio --verify-only jobfile' to do the split verification as the updated one below?

myjob.fio updated:
	[global] 
	bs=4k    
	direct=1 
	ioengine=sync
	verify=crc32c  
	filename=/dev/sdf
	io_size=10k

	[write-phase]  
	rw=randwrite
	do_verify=0

Thank you very much again!

Regards,
Vaughan


--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux