On Fri, Jun 28, 2024 at 11:25:34PM -0700, Christoph Hellwig wrote: > On Fri, Jun 28, 2024 at 02:23:50PM -0700, Luis Chamberlain wrote: > > We currently rely on the block device logical block size for the > > offset alignment. While this *works* it doesn't work with performance > > in mind. That's exactly what the minimum_io_size attribute is for. > > > > This would for example enhance performance for DIO on 4k IU drives which > > have for example an LBA format of 512 bytes for both HDDs and NVMe. > > Another use case is to ensure that DIO will be used with 16k IOs on > > existing market 16k IU drives with an LBA format of 4k or 512 bytes. > > The minimum_io_size clearly is the minimum I/O size, not the minimal > nice to have one. I may have misread the below documentation then, because it seems to suggest this is a performance parameter, not a real minimum. Do we need to update it? What: /sys/block/<disk>/queue/minimum_io_size Date: April 2009 Contact: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Description: [RO] Storage devices may report a granularity or preferred minimum I/O size which is the smallest request the device can perform without incurring a performance penalty. For disk drives this is often the physical block size. For RAID arrays it is often the stripe chunk size. A properly aligned multiple of minimum_io_size is the preferred request size for workloads where a high number of I/O operations is desired. If this is not the right place, do we need to use a new topology entry for the IU? Today the NVMe drive uses it for the NPWG which these days is the IU. > Changing this will break existing setups. My impression was that STATX_DIOALIGN was rather new, so any new enhancements due to the difficulties in getting DIO alignment right, this was the right place to do so. Let me know if you have other suggestions. Luis