@happymoomoo @freemo the problem is that the disk io would probably wreck that ssd.

@fristi @happymoomoo @freemo Have you considered using databases specifically geared towards in-memory retrieval? Redis is a really good choice. You can always use both, Redis for the fast reads/cache and then have a Postgres layer that keeps what you want to persist to disk.

Follow

@fristi
Aside from the obvious risk of loosing your data postgres on ramdisk works fine. But only use it for volatile data

I doubt its a good choice if all you want is to improve performance on a normal persistant db.

@djsumdog @happymoomoo

@freemo @djsumdog @happymoomoo it's not really for performance. It's for offloading pleroma's db job queue into ram so it doesn't hit my disk so much.

@fristi
Sounds like a solution that shoukd exist in plorma ideally but doesnt. As someone mentioned using inmemory redis cache along side a database db would be how pleorma should have designed that.

With that said you can potentially improve things by tweaking the write cache in postgres however if you avoid the db you still risk volatility issues... The less that stays in memory before writing to db the less your reliability. Read cacheing is much safer but doesnt prevent your hard drive from being hit with a write.

postgresql.org/docs/9.1/wal-re

@djsumdog @happymoomoo

@freemo @djsumdog @happymoomoo >As someone mentioned using inmemory redis cache along side a database db would be how pleorma should have designed that.

I agree, we use a similar setup at work for background tasks.

I've currently upped the shared_buffers on my postgres install. While not exactly perfect, it does seem to decrease disk io to some extend. Maybe by increasing the read/write cache, I should be able to get the result I want. As for the volatility, I'll have to find a sweet spot, I guess. At least my server has a ups powering it, so at least sudden power outages aren't gonna fuck things up.
Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.