File IO Or Block IO???


I am not sure what are the differences between File IO and Block IO


iSCSI Target is delivering a block device for the iSCSI initiator. The block device can be a raw Logical Volume or a file working on formatted Logical Volume.
The Block IO is exactly a raw Logical Volume which is formatted only by the initiator side. IO performance should be faster because there is no delay made by the filessytem layer.
The File IO is delivering file working on formatted Logical Volume. This gives additional benefits of filesystem like caching part of the data. Not initialized, File IO provides even another benefit “organized writing”, which is optimized for current usage.
In most cases File IO provides better performance because of the caching - but in case of multiple hardware initiators Block IO gives the highest read/write speed.
File IO no initialization:
XFS uses first free block for saving the data – no need to use „SEEK” command.
High performance while „random write”, low performance while sequential read.‏
File IO with initialization:
System must perform a real SEEK in order to read/write the data.
XFS table has to be read and updated.
More stable than “not initialized” volume.
Block IO:
System must perform real SEEK operation on disk in order to save/write the data.
XFS table will NOT be updated.
Data is stored directly on the hard drive (no memory writes required)‏

Article ID: 342
Last updated: 17 Sep, 2009
Revision: 1
Information -> General info -> iSCSI -> File IO Or Block IO???