Interesting to see a 20% performance increase due to blocksize being 16k instead of 8k.
Interesting to see a 20% performance increase due to blocksize being 16k instead of 8k.
Nonetheless, the article is interesting as a way to understand how Postgres and ZFS go together.
Writes always have to touch disk of course to be durable so the underlying does matter. I'm not super familiar with MSSQL but does it have Direct IO? I have to admit I know almost nothing about the internals of MSSQL or the characteristics of filesystems on Windows.
There's a wealth of complexity and tunables in just how ZFS will write to disk along with how it will use and optimize ARC. Basically there's a second WAL at the disk level (the ZIL/SLOG) to contend with so there are lots of ways to do things and properties of the storage system can change.
MS SQL configuration and tuning is less and less about storage and more and more about server parameters (most defaults are coming from the SQL version that introduced it, ex. SQL 2000 almost 22 years ago), query and index tuning. The last 2 can make huge differences, many orders of magnitude, so this is where most time is spent optimizing. The server configuration part is usually a list of 10-20 parameters every DBA is changing from start almost never touch later. This makes it really easy on that part.
That said, the reasons I haven't published all my notes is because:
- I only used one testing software pgbench (which is notorious for producing)
- Good evaluation needs a long term assessment of drive fragmentation which is hard to do (and literally takes time)
- Sometimes I changed multiple variables at a time, and not all the values I have in my notes are averaged across multiple runs, etc.
So in the end this post was just gathering what other much smarter people have said that I took inspiration from so it's all in one place.
Some intuition as well on why 16k can work better than 8k is in that scale15x talk -- for sequential table scans, it's almost like you're pre-faulting. A contact I've made through this research also recently suggested to me that I was only scratching the surface -- bigger record sizes should be better, as long as write amplification can be managed and fragmentation avoided (via a SLOG or more tuning).
- https://www.reddit.com/r/zfs/comments/rjavyc/everything_ive_...
- https://www.reddit.com/r/zfs/comments/rlfhxb/why_not_txg_tim...
- https://www.reddit.com/r/PostgreSQL/comments/rlrvt1/what_hap...