Database use of SMR drives
Database use of SMR drives
Posted Jun 27, 2015 17:08 UTC (Sat) by andresfreund (subscriber, #69562)In reply to: Database use of SMR drives by kleptog
Parent article: A report from PGCon 2015
Correct.
Minor nitpick: It's not primarily the cost of these functions, they're called in many situations regardless. It's that another on-disk file (the 'clog', a integer indexed file listing whether a transaction committed or not) has to be consulted. That's often where much of the time is spent. Especially if you have significant throughput, and access older, uncached, regions of the clog.
> SMR for databases would be useful for the WAL logging, since they are write once, but for the tables it seems unlikely.
I think SMR for the WAL would not be a good idea - due the the need of somewhat frequent fsync you'll likely end up with horrible performance.
But for some workloads where you have append-only data that is only infrequently read it's not unrealistic to use SMR. It's quite common that only the last few months worth of data will be modified, but that you have to archive years worth for regulatory and reporting reasons. Moving older partitions to storage with different characteristics is not unreasonable.