Is it worth it making a ZFS partition with compression for Postgres in order to save space? I assume since it's mostly text it should compress fairly well.
Or is there a better FS for compression?

@matrix I've read a couple docs on it now, it sounds like it works fine. However, you will want to follow a guide because it requires some configuration on the postgresql server.
@Moon @matrix and also shouldn't compressing a database be seen as a last resort to just expanding the partition?
@lewdthewides @matrix if you've got cpu cycles to spare, why not? Also pg uses a compression they call TOAST, when you use ZFS compression you turn it off so you're not doing it twice.

@Moon
How big is it a CPU hit? My Masto VPS only really gets pinned when someone posts a bigger non x264 video and it starts transcoding
@lewdthewides

@matrix @lewdthewides I haven't done it but I doubt it's a problem.

So basically if you were doing this you'd be doing it to save space. I can't say what the performance implications are. I've ready typically that copy on write filesystems are bad for databases but there are multiple guides on hosting your postgres db on zfs. Either it's tolerable, or these people aren't having performance problems because they're not taxing the db. pleroma will tax the db. So, I just don't know.
Follow

@Moon
Mastodon seems to be more efficient with DB usage than Pleroma, however since server has NVME all the queries are mostlikely CPU bound which means it could perform worse.
I might copy the DB to my PC, spin up VM to test it first.
I have a NVME drive and the same CPU architecture so it should show conclusive results.
@lewdthewides

@matrix @lewdthewides pleroma storing jsonb doesn't seem to be efficient but it's good for other reasons

@Moon
I assume it's better for CPU usage when serving AP activities because it doesn't have to create it, just queries the db and serves it?
@lewdthewides

@matrix @lewdthewides I mean that it's more easily expandable to additional activitypub object types.
@matrix @Moon @lewdthewides could do what I did and get a slab and setup a writeback cache with a partition on the NVME. 99% of the time I got NVME performance.
sjw@bae.st @matrix @Moon that's pretty much what I'm doing here
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.