Filesystem vs. PostgreSQL block size
Recently I've been asked how is the database performance affected by the block size (for filesystem and database), especially with respect to SSD drives that have 512kB internal blocks while traditional spinning HDD use 512B or 4096B sectors.
When someone asks about this on pgsql-performance list, the usual answer is "Use 8kB, Luke!" because 8kB is a reasonable compromise and using a different block size probably won't give you much. But is that really true? Is that true for all file systems? And does that hold for all workloads? And what about the SSD drives? And what about the filesystem block size?
Interesting questions, but it's impossible to answer them without hard data ... time for a benchmark!




