Does putting the XFS log on an SSD significantly improve performance?

Solution 1:

The performance metric you need to keep an eye on is sequential writes. Devices with high sequential write rates are good for an external log device. That said, FS logs are pretty small relative to the data size. Old fashioned rotational magnetic media can turn in some impressive sequential write numbers. If you can afford to spare it, a single old-school hard-drive can be a very good external log device so long as you can dedicate that one device to that one log.

The top tier of SSDs can beat rotational media for sequential write speeds. By dedicating one of these premium drives to logging you gain a few things. Yes, it'll wear faster since writes do wear SSDs down. However, if you're only using 5% of the drive (if that much) the firmware on these drives is smart enough to allow even 50% (or more) bad cells before you start getting problems with the log volume corrupting; your OS should alarm on this well before you get to this point. By committing writes faster than rotational media, you greatly reduce the metadata bottleneck that XFS is prone to.

Is it any faster in practice? Can't say. A lot of it depends on what kind of data is on that XFS drive. As I said, metadata updates are the serious thing. If 'noatime' is not giving you enough breathing room and your throughput is still throttling on metadata updates, an external log drive (SSD or rotational) would be a good next step to eek out performance.

Solution 2:

Re: "Limited writes haven't been a problem for good solid-state storage for 10 years or so..."

That's not true.

Newer Flash based SSDs are based on MLC flash and have have lower write endurance than older SLC based models (~10x lower). Firmware on these SSDs distributes the writes across the entire capacity of the SSD, this is called "wear-leveling". Bottom line is that all Flash SSDs wear out with write activity, and the more the density of the underlying Flash parts increases (from SLC to 2-bits-per-cel MLC to 3-bits-per-cel, etc), the faster the Flash wears out.

Disk drives wear out with time, Flash wears out with usage.

Flash is NOT a good place to put a file-system log, not only because Flash wears out, but for economic reasons. The log/journal writes are 100% pure sequential I/O (no randomness). For this workload, spinning disk costs only about 1/10th as much as SSD in terms of cost-per-MByte-per-second.