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.

  • Morethanevil@lemmy.fedifriends.social
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    4 months ago

    I have had one database container for each service, because “if something happens”…

    Now I have one container for all databases for postgres, finetuned with PGTune, never regretted it. Important is proper backup, like datadump with pg_dumpall

    More performance, less overhead. If you are confident enough and experienced in docker, then use postgres on your host instead of a container. But one container for all databases is okay too.

    Some people will disagree and this is fine, but this is my way to manage it. It is not this complicated ☺️