I want to migrate my Nextcloud instance from MariaDB over to PostgreSQL. I already have a PostgreSQL service running for Lemmy. And I’m pretty starved for RAM.

Would it be better to just have one PostgreSQL service running that serves both Nextcloud and Lemmy? Or should every service have its own PostgreSQL instance?

I’m pretty new to PostgreSQL. But in my mind I would tend towards one service to serve them all and let it figure out by itself how to split resources between everything. Especially when I think that in the long run I will probably migrate more services over to PostgreSQL (and upgrade the RAM).

But maybe I am overlooking something.

Edit: Thanks guys, I’ve settled for a single instance for now. And after a little tuning everything seems to be running better than ever, with room to spare.

  • @DeltaTangoLima@reddrefuge.com
    link
    fedilink
    English
    14 months ago

    If you’re starved for RAM, there’s nothing wrong with a shared instance, as long as you’re aware of the risk of that single instance bringing down multiple services.

    I run a three node Proxmox cluster, and two nodes have 80GB RAM each, so my situation is very different to yours. So, I have four Postgres instances:

    1. Mission critical: pretty much my RADIUS database, for wireless auth and not much else (yet)
    2. Important: paperless-ngx, and other similarly important services
    3. Immich: because Immich has a very specific set of Postgres requirements
    4. Meh: 2 x Sonarr, 3 x Radarr, 1 x Lidarr (not fussed if this instances goes down and takes all of those services with it)