Re: Sequential Commands are essentially random when in mixed sequential/random workloads

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

 



On Sun, Dec 14, 2014 at 1:53 AM, Jens Axboe <axboe@xxxxxxxxx> wrote:
> On 12/12/2014 05:23 PM, Stephen Nichols wrote:
>> Hi all,
>>
>> When using fio configuration below..
>>
>> [global]
>> ioengine=libaio
>> direct=1
>> runtime=600
>> bs=32k
>> iodepth=8
>> rw=randrw
>> rwmixread=80
>> percentage_random=100,0
>>
>> [drive1]
>> filename=/dev/sda
>>
>>
>> I am expecting to see 80% reads, 20% writes where all reads are random and all writes are sequential. I captured a bus trace of traffic to the disk and the bus trace reflected as much with one issue. The write commands are essentially random. Each write begins at a new random LBA. If 2 or more writes occur in a row, the LBA's are sequential based on the block size BUT I feel the heart of this feature would be to emulate a large file write during random access. With that in mind would it be possible for sequential reads or writes within mixed sequential/random workload to remember the last LBA accessed? In this scenario the writes would still only take up 20% of the workload but when a write did occur it should be the next sequential step from the last write.
>>
>>
>> Snippet from the bus trace for reference
>>
>> Command                                           LBA
>> Read FPDMA Queued:                  19F3F818
>> Read FPDMA Queued:                  1CBE2740
>> Write FPDMA Queued:                 24E35198
>> Write FPDMA Queued:                 24E351A0
>> Read FPDMA Queued:                  115A9E10
>> Write FPDMA Queued:                 A3C1968
>> Read FPDMA Queued:                  20B89488
>> Write FPDMA Queued:                 336EE0D0
>> Write FPDMA Queued:                 336EE0D8
>>
>>
>>
>> Let me know what you think, this feature may be working as intended but it seemed off to me.
>
> Would be easy enough to fix, we just need to track last offset per data
> direction. Does the attached work for you? Totally untested, will test
> on Monday.

Looks like fixed.

Regards,
Andrey

io       8568  load ioengine libaio
drive1: (g=0): rw=randrw, bs=32K-32K/32K-32K/32K-32K, ioengine=libaio, iodepth=8
fio-2.1.14-45-g7003
Starting 1 process
io       8570  invalidate cache /tmp/drive1: 0/1048576
io       8570  get_next_block: last read pos 0
io       8570  fill_io_u: io_u 0x176be40: off=32768/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176be40: off=32768/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176be40)=0
io       8570  queue: io_u 0x176be40: off=32768/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 1
io       8570  get_next_block: last read pos 65536
io       8570  fill_io_u: io_u 0x176bb40:
off=753664/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176bb40: off=753664/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176bb40)=0
io       8570  queue: io_u 0x176bb40: off=753664/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 2
io       8570  get_next_block: last read pos 786432
io       8570  fill_io_u: io_u 0x176b400:
off=851968/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176b400: off=851968/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176b400)=0
io       8570  queue: io_u 0x176b400: off=851968/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 3
===
io       8570  get_next_block: last write pos 0
io       8570  fill_io_u: io_u 0x176b100: off=0/len=32768/ddir=1//tmp/drive1
io       8570  prep: io_u 0x176b100: off=0/len=32768/ddir=1//tmp/drive1
io       8570  ->prep(0x176b100)=0
io       8570  queue: io_u 0x176b100: off=0/len=32768/ddir=1//tmp/drive1
io       8570  calling ->commit(), depth 4
io       8570  get_next_block: last read pos 884736
io       8570  fill_io_u: io_u 0x176ae00:
off=491520/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176ae00: off=491520/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176ae00)=0
io       8570  queue: io_u 0x176ae00: off=491520/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 5
io       8570  get_next_block: last read pos 524288
io       8570  fill_io_u: io_u 0x176ab00:
off=393216/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176ab00: off=393216/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176ab00)=0
io       8570  queue: io_u 0x176ab00: off=393216/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 6
io       8570  get_next_block: last read pos 425984
io       8570  fill_io_u: io_u 0x176a840: off=0/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176a840: off=0/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176a840)=0
io       8570  queue: io_u 0x176a840: off=0/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 7
io       8570  get_next_block: last read pos 32768
io       8570  fill_io_u: io_u 0x176a540: off=65536/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176a540: off=65536/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176a540)=0
io       8570  queue: io_u 0x176a540: off=65536/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176b100: off=0/len=32768/ddir=1//tmp/drive1
io       8570  get_next_block: last read pos 98304
io       8570  fill_io_u: io_u 0x176b100:
off=360448/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176b100: off=360448/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176b100)=0
io       8570  queue: io_u 0x176b100: off=360448/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176a840: off=0/len=32768/ddir=0//tmp/drive1
===
io       8570  get_next_block: last write pos 32768
io       8570  fill_io_u: io_u 0x176a840: off=32768/len=32768/ddir=1//tmp/drive1
io       8570  prep: io_u 0x176a840: off=32768/len=32768/ddir=1//tmp/drive1
io       8570  ->prep(0x176a840)=0
io       8570  queue: io_u 0x176a840: off=32768/len=32768/ddir=1//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176a840:
off=32768/len=32768/ddir=1//tmp/drive1
io       8570  get_next_block: last read pos 393216
io       8570  fill_io_u: io_u 0x176a840:
off=950272/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176a840: off=950272/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176a840)=0
io       8570  queue: io_u 0x176a840: off=950272/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176be40:
off=32768/len=32768/ddir=0//tmp/drive1
io       8570  get_next_block: last read pos 983040
io       8570  fill_io_u: io_u 0x176be40: off=98304/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176be40: off=98304/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176be40)=0
io       8570  queue: io_u 0x176be40: off=98304/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176bb40:
off=753664/len=32768/ddir=0//tmp/drive1
io       8570  get_next_block: last read pos 131072
io       8570  fill_io_u: io_u 0x176bb40:
off=884736/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176bb40: off=884736/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176bb40)=0
io       8570  queue: io_u 0x176bb40: off=884736/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176b400:
off=851968/len=32768/ddir=0//tmp/drive1
io       8570  get_next_block: last read pos 917504
io       8570  fill_io_u: io_u 0x176b400:
off=655360/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176b400: off=655360/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176b400)=0
io       8570  queue: io_u 0x176b400: off=655360/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176ae00:
off=491520/len=32768/ddir=0//tmp/drive1
io       8570  get_next_block: last read pos 688128
io       8570  fill_io_u: io_u 0x176ae00:
off=131072/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176ae00: off=131072/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176ae00)=0
io       8570  queue: io_u 0x176ae00: off=131072/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176ab00:
off=393216/len=32768/ddir=0//tmp/drive1
io       8570  get_next_block: last read pos 163840
io       8570  fill_io_u: io_u 0x176ab00:
off=229376/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176ab00: off=229376/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176ab00)=0
io       8570  queue: io_u 0x176ab00: off=229376/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176a540:
off=65536/len=32768/ddir=0//tmp/drive1
io       8570  get_next_block: last read pos 262144
io       8570  fill_io_u: io_u 0x176a540:
off=163840/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176a540: off=163840/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176a540)=0
io       8570  queue: io_u 0x176a540: off=163840/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176b100:
off=360448/len=32768/ddir=0//tmp/drive1
io       8570  get_next_block: last read pos 196608
io       8570  fill_io_u: io_u 0x176b100:
off=557056/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176b100: off=557056/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176b100)=0
io       8570  queue: io_u 0x176b100: off=557056/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176a840:
off=950272/len=32768/ddir=0//tmp/drive1
io       8570  get_next_block: last read pos 589824
io       8570  fill_io_u: io_u 0x176a840:
off=458752/len=32768/ddir=0//tmp/drive1
io       8570  prep: io_u 0x176a840: off=458752/len=32768/ddir=0//tmp/drive1
io       8570  ->prep(0x176a840)=0
io       8570  queue: io_u 0x176a840: off=458752/len=32768/ddir=0//tmp/drive1
io       8570  calling ->commit(), depth 8
io       8570  io_u_queued_completed: min=1
io       8570  getevents: 1
io       8570  io complete: io_u 0x176be40:
off=98304/len=32768/ddir=0//tmp/drive1
===
io       8570  get_next_block: last write pos 65536
io       8570  fill_io_u: io_u 0x176be40: off=65536/len=32768/ddir=1//tmp/drive1
io       8570  prep: io_u 0x176be40: off=65536/len=32768/ddir=1//tmp/drive1
io       8570  ->prep(0x176be40)=0
io       8570  queue: io_u 0x176be40: off=65536/len=32768/ddir=1//tmp/drive1

>
> --
> Jens Axboe
>
--
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