Self hosted Metabase, database size needed for production?

Migrate the application database to a production database
You’ll need to migrate the application database that ships with Metabase (an H2 database) to a production SQL database. The application database stores all of your users, questions, dashboards, and other Metabase application data.

The reason Metabase ships with the H2 database out of the box is to make it easy to get Metabase up and running on your machine. But the H2 database is not suitable for running Metabase in production.

We recommend you migrate to PostgreSQL, MySQL, or MariaDB.

I've searched and have not found any indications of what size of Metabase dedicated Database do I need?

If I have a production database with 50GB data, using 4vCPU, 2GB RAM, how much resources of RAM, CPU, Disk should my Metabase database have?

Hi @goktugyilmaz
I would recommend reading this:
https://www.metabase.com/learn/administration/metabase-at-scale.html
It is quite difficult to give specific recommendation, since it depends on usage.
The application database for most would be fine on a smaller instance - 10GB, 2vCPU, 1GB.

1 Like

Thanks for sharing.

Is it recommended putting Metabase on top of a production database, or a separate read-only database?

@goktugyilmaz I think you are misunderstanding what the "Metabase application database" is.
That is where Metabase stores all it's information (settings, users, questions, etc).
https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html
You can use an existing database server. This depends on your load, how you generally apply security and separation of apps.

Oh no, I understood "Metabase application database".

I was asking about a different context in my next question: about the production database which Metabase will read from.

Which is usually recommended, for a 50GB DB. Production DB or read-only clone? And in what scenarios which case.

@goktugyilmaz This depends on the database type and the schema.

If you see Metabase putting too much load on your warehouse database, or it's already under a lot of load, then you'll of course want to use a replica.
https://www.metabase.com/learn/administration/making-dashboards-faster.html#replicate-your-database

There's no one-size fits all. You might have a large database than others, but perhaps you only have 2 active users, while someone with 3GB of data might have 500 active users.

The scaling guide I already linked tries to explain how to tweak some parts of Metabase.

1 Like