Re: one 16K random read I/O issues 2 scsi I/O (16K and 4K) requests

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

 



Thank you for the comment.
I just figured it out and was checking ext4.

This problem never happens with ext4 !!!
It's from ext3 indirect block addressing.

Thank you Bart.


On Sun, Dec 2, 2012 at 7:26 PM, Bart Van Assche <bvanassche@xxxxxxx> wrote:
> On 12/02/12 10:23, Hiroyuki Yamada wrote:
>>
>> I figured out what is going on, but I don't know what it is for.
>>
>> Ext3 filesystem has some 4KB data in each 4096KB(8192 sectors) data.
>> Visually, data is aligned like the following.
>>
>> |4KB|4096KB|4KB|4096KB|4KB|4096KB| ...
>>
>> And 4096KB area in only accessible by application programs.
>> When accessing the first 4096KB area for the first time,
>> then OS reads the 4KB just before the 4096KB area first
>> and then read the requested data in the 4096KB area.
>>
>> When accessing a large file (compared to the DRAM size) randomly,
>> every I/O has rare chance of hitting page cahce,
>> so every I/O request comes together with 4KB I/O.
>>
>> The thing is what the 4KB data is for ?
>> Is this location metadata for filesystem ?
>> Is there any way I can remove this ?
>> Or Is there any way I can clear the 4096KB area only ?
>
>
> Does this behavior also occur with ext4 ? From the ext4 wiki
> (http://ext4.wiki.kernel.org/index.php/Ext4_Howto#Extents):
>
>  Extents
>
> Traditional, Unix-derived, file systems, like Ext3, use a indirect block
> mapping scheme to keep track of each block used for the blocks corresponding
> to the data of a file. This is inefficient for large files, especially
> during large file delete and truncate operations, because the mapping keeps
> an entry for every single block, and big files have many blocks -> huge
> mappings, slow to handle. Modern file systems use a different approach
> called "extents". An extent is basically a bunch of contiguous physical
> blocks. It basically says "The data is in the next n blocks". For example, a
> 100 MiB file can be allocated into a single extent of that size, instead of
> needing to create the indirect mapping for 25600 blocks (4 KiB per block).
> Huge files are split in several extents. Extents improve the performance and
> also help to reduce the fragmentation, since an extent encourages continuous
> layouts on the disk.
>
> Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux