jgreco
Resident Grinch
- Joined
- May 29, 2011
- Messages
- 18,680
If you try this, please report back. I'd guess performance improvements with a spinning-disk SLOG would be marginal if not actually negative.
This isn't true in practice, though I understand your thinking.
What actually happens is that the write cache on the RAID controller actually soaks up the writes at very high speed, at least until the cache is filled. The POSIX sync write idea is that you want the write to be committed to some form of stable storage prior to acknowledging a write, but for the purposes of a RAID controller, battery backed write cache is considered stable storage.
So if you have a 2GB cache of which 1GB is BBWC, you can soak up 1GB of small sync writes pretty much as fast as you can chuck write calls at the kernel (and for ZFS, without even crossing the user/kernel boundary). These are then streamed out to the backing SATA or SAS device.
Now, where it gets interesting is that flash wears out. So you can do all sorts of tricks to optimize for SSD, such as keeping the SLOG partition size just large enough to soak up a few transaction groups, but sooner or later you're likely to burn through your flash's endurance. The upside here is that you might be able to do this at ~500MBytes/sec until the thing dies. As Eric noted, though, you might not be able to accomplish this feat with consumer SSD's.
Hard disk, on the other hand, has nearly infinite endurance (relative to flash). However, the fastest hard drives are maybe ~200MBytes/sec. Because SLOG writes are generally sequantial, in practice you can build a BBWC-RAID-plus-HDD based SLOG device that is capable of a 1GByte burst write followed by sustained 200MBytes/sec of sync write activity. Virtually forever.
It is probably more practical and affordable in this era to get yourself a nice Intel PCIe SSD like the 750 (lowish endurance) or better yet the P3700, both of which sport power loss protection, high speed PCIe, and the total solution cost may be lower than buying a BBWC RAID plus HDD's plus the annoyance of a bunch of figure-it-out-yourself. But obviously the OP has the hardware already. Doesn't hurt to see how well it works.