Performance issues occurred when multiple users were using

Hello folks,
I am applying Metabase in university's courses, and I met serious performance issues when dozens of students using it. So I am asking for help about performance tuning of Metabase deployment.

I deployed Metabase on Cloud. Here is the versions of related softwares:
Centos8, openjdk 11, Metabase v0.48.8-SNAPSHOT, docker 19/21.
Metabase environment variables:
MB_JETTY_MAXTHREADS: 100
MB_APPLICATION_DB_MAX_CONNECTION_POOL_SIZE: 100
MB_JDBC_DATA_WAREHOUSE_MAX_CONNECTION_POOL_SIZE: 30
xmx: no limit

In first scenario, I deployed Metabase application in a docker with 4 processors and 4GB memory. But the service became unresponsive when about 67 students were using it, even though the deployment scaled up to 4 replicas. Service was back after I restarted dockers around 14:35.


In second scenario, I used a docker with 8 processors and 16GB memory, 1 replica. Everything went well. There were about 140 students . But CPU only used about 3 processors, and memory used less then 3 GB.


I have no idea about these two situations. it seems 4 processors and 4GB is enough for dozens users. but the first scenario says no. Could anyone give me any suggestions, deployment, environment variables, Metabase configurations and other tunings?

btw, database is not the bottleneck. The experiment databases are small, and db query performance was good.

for teaching purpose, I created a lot of databases and temporary users to separate data and cards. Will this affect performance?

Thanks for your support.

Are you using the H2 database for Metabase or have you migrated to a proper database?

Also, did you add the databases and right after the users were using Metabase? remember that Metabase will use 1 core to sync per DB, so if the database is big you can have all cores being used in sync and users won't be able to use Metabase

Hi Andrew, I am using MySQL 8.0 in a two nodes cluster, each node has 4cores and 8GB memory. for now the total db size is about 70GB, including metabase db and data warehouse db. Database seemed good.

Thanks Luiggi, could u give me some ideas about how often metabase sync DB? May I use a independent compute node to sync DB so that other nodes, not running sync service, can serve users' requests?