geom write-cache awareness
krichy at cflinux.hu
krichy at cflinux.hu
Mon Dec 2 14:51:28 UTC 2013
Dear scsi devs,
I am facing with a strange problem, mentioned earlier: I bought an SSD
for the purpose of zfs ZIL. I made tests regarding its speed under
linux, after which I decided it will suit my needs. It performs enough
IOPS for me, and has power-loss protection, so my data is in safe.
Upon attaching the drive, under linux and under freebsd it has its
write-cache disabled. Linux handles this, and in this way, it does not
issue FLUSH commands to the device, as it assumes it has its write cache
disabled. Unfortunately, the drive serves flush commands slow, I dont
know why. And as FreeBSD currently ignores such settings, and always
issues the FLUSH command, this makes my drive perform slow on FreeBSD.
And when I enable the write cache in linux, it gets sending the flush
commands, it gets also that slow performance.
What would if FreeBSD's geom layer has some knowledge about the
underlying device's cache setting, and if it knows as it has no or has a
write-through cache, skip flush commands? Maybe this could improve
performance in other scenarios also, when one explicitly disables the
cache. And of course, it would solve my problem also.
As I am not a FreeBSD kernel developer, I just tried to implement such
awareness for geom and for ata devices only, the diff is attached, it is
against 9.2-RELENG.
Please review the idea, or give advice how to solve my problem.
Thanks in advance,
Kojedzinszky Richard
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: geom_write_through.diff
URL: <http://lists.freebsd.org/pipermail/freebsd-scsi/attachments/20131202/7674dc33/attachment.ksh>
More information about the freebsd-scsi
mailing list