3 ms·
why are you doing compression at the fs layer rather than the db layer? postgres supports compression and I'd assume it would do a better job than the filesyste
by adgjlsfhk1 1y ago
why are you doing compression at the fs layer rather than the db layer? postgres supports compression and I'd assume it would do a better job than the filesystem
- rtp4me 1y agoBased on our testing, we get much better compression using ZFS than PGSQL. As a side benefit, we also get snapshots and the ability to easily find out how much compression our DBs are getting. According to a quick google search (to refresh my memory), PGSQL compression (eg: TOAST) targets specific large data values within tables, while ZFS compresses all data written to the ZFS pool.
- tempest_ 1y agoPostgres doesnt have great compression. Depending on your database you can reduce the size by 50% sometimes with high zstd zfs configurations. No lunch is free though. Aside from the obvious cpu cycles spent compressing configuring zfs / postgres is a pain in the ass and really depends on the trade offs and use cases.