Re: FILEIO vs iblock

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

 



On Tue, 2013-12-10 at 23:47 +0100, Henrik Goldman wrote:
> Hello,
> 
> Several pages including
> http://linux-iscsi.org/wiki/Targetcli#Create_a_backstore seems to
> suggest that you should use iblock as the backstore for production
> setups.
> 
> However from our tests we see that performance is significantly
> decreased compared with buffered fileio. In our tests we found a 2-4x
> difference.
> 
> I understand obviously that buffered io is less safe than unbuffered
> but it's not clear for me why performance is so much different.
> 
> One of the greatest features of fileio is that you essentially use all
> your system memory as cache... something which is not very
> highlighted.
> 

You just answered your own question.  ;-)

Buffered FILEIO means all WRITEs go into the filesystem buffer cache,
and only an explicit SYNCHRONIZE_CACHE or WRITE FUA (Forced Unit Access)
from the client will force flushing of said WRITE data from buffer cache
to the persistent backend device.

> Personally I don't understand why buffered fileio is not highlighted
> as it's clearly giving the best performance.
> 

Because if/when the target power goes out, you loose all WRITE data in
the buffer cache for a buffered FILEIO device that has not been flushed
to the backend device.  Whoooops..

A proper production solution here is using bcache with a SSD / flash
device with write-back mode with IBLOCK export, which puts all WRITEs
onto the fast flash persistent storage, thus avoiding the potential for
data-loss during power-loss as with the buffered FILEIO case.

--nab

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux