Metabase blocking other apps on server

Hi,

we are using metabase.jar with H2 database on our WIndows Server 2016. Currently we have 4GB of data in SQL Server Express which is also on the same server.

I can’t see any problem in task manager, memory 40%, CPU 10%, but when i start java -jar metabase.jar everything starts to slow down. We have 20+ users working through RDP on server and their apps are really when we start Metabase.

So, metabase is not slow , but other apps are when metabase is running.

Any suggestions?

Thank you in advance, Filip.

Hi @filipk

You should consider using Postgres or MySQL instead of H2, since it doesn’t handle corruption very well.

Which version of Metabase and Java (64bit?) ?
Is Metabase done synchronizing your SQL?
So you don’t see any jumps on memory/CPU, when starting Metabase?
Is it only the app, which uses SQL, that is slow or the entire RDP (meaning any app) ?
Have you checked if there’s high disk I/O? that can make everything feel slow.

Hi,
Thank you for your response.

I checked disk I/O and i think this is the main problem. You can see spike which happens when i refresh dashboard.

Is there any solution for that?

Kind regards, Filip

@filipk

You should consider using Postgres or MySQL instead of H2, since it doesn’t handle corruption very well.

Which version of Metabase and Java (64bit?) ?
Is the server using a SSD or harddrive?

Since you say it’s happening, when you go to a dashboard, then it leads me to think that you have a question on that dashboard, which is doing a bad query. Check all the questions to figure out if one (or more) of them is overloading the database.
You can also check the database log, which should tell you if queries are slow or using non-indexes, which means it has to generate temporary tables on disk.

EDIT: But you need to confirm that it’s the SQL, which using all the disk I/O.

Hi @flamber,

i checked and i problem is in sqlsrvr.exe

We are actually exporting our ERP DB in DW and indexes are not set properly because this is not main DB, it is used only for BI purposes. I will add some indexes and it should be a lot better.

Now few GB of data should be fetched in memory to check foreign keys etc… no indexes

Thank you very much!

Kind regards, Filip

1 Like

SQL Server Express can also create a bottleneck here. I also give permission to the metabase SQL user for few tables. So MB can’t see and analyze other unnecessary tables.

@turker.tunali I know Sql express has only 1GB RAM and 10GB of hard disk.

Btw. I found out where is the problem. DB was not indexed and table with few milions of rows was fetched in RAM from DB.

I put few indexes and now everything is very fast.

Kind regards, Filip

@filipk Express edition also doesn’t utilize CPU well.

Good to know if you are ok with indexes.

Regards,
Turker

If you’re using SQL Express 2016 SP1 or later, you can use the rather magical Columnstore indexes. More information here: