Re: Failures noticed in FIO run

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

 



On 9 February 2018 at 04:21, Gnana Sekhar <kgsgnana2020@xxxxxxxxx> wrote:
>
> Below is the drive information
> blockdev --getsize64  /dev/nvme0n1
>
> 3840755982336
>
> fdisk -l
>
> Disk /dev/nvme0n1: 3840.8 GB, 3840755982336 bytes, 7501476528 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
>
> I had to change the sector size from 4K to 512 and now I didn't see
> the failure mentioned below. Will loop through and update

Seems strange that the problem would go away just due to shrinking
fio's blocksize given that 4k is a multiple of 512. You never said if
dmesg showed any clues though...

> I was using offset and sizeToWrite parameters when I wanted to fill
> certain number of bytes from certain start location.
> Currently I am using "sizeToWrite" to specify the bytes to write and
> "offset" from the byte to start
> But from the suggestions it seems I have to chose the offset such that
> its divisible by blocksize of filesystem. I am using blockdev --getbsz

Note in the examples you gave you were not doing I/O to a file in a
filesystem - you were just writing directly to a disk so I'm going to
assume you just mean disk where you have written filesystem :-) But
yes, you will have to ensure an absolute offset is a multiple of the
disk's block size when doing direct IO to a disk on Linux.

> Let me know if you guys think that should solve the problem or you
> come across any other optimal way to do the same without using offset
> and sizeToWrite

Only passing in an aligned offset should solve the problem and I'm not
aware of anther way.

> Also which of the below do you think I should use to get the LBA size on device
> blockdev --getbsz /dev/nvme0n1 or blockdev --getss /dev/nvme0n1

Either will do but if I were choosing I'd prefer the number from
getbsz. From what I can see getbsz corresponds to the physical block
size (which is closer to the minimum block size the "disk" actually
has to use behind the scenes) and getss corresponds to the logical
block size (the minimum block size your "disk" can accept even if it
means it means faking it and doing extra work).

-- 
Sitsofe | http://sucs.org/~sits/
--
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