2

I have a problem with the performance of my MariaDB server in osx arm64 (M1):

I installed MySQL server via Homebrew, after a while I reinstalled it on MariaDB 10.7.3 via Homebrew.

after that, the performance dropped a lot.

I tried deleting everything related to MySQL, reinstalling, and it didn't help.

I compare the performance native MariaDB and Docker. here are the results:

SQL:

SET profiling = 1;
DROP TABLE IF EXISTS t1;
CREATE TABLE T1 (id INT);
SHOW PROFILES;
SHOW PROFILE;

Native results:

+----------+------------+--------------------------+
| Query_ID | Duration   | Query                    |
+----------+------------+--------------------------+
|        1 | 0.12808600 | DROP TABLE IF EXISTS t1  |
|        2 | 0.10424100 | CREATE TABLE T1 (id INT) |
+----------+------------+--------------------------+
+------------------------+----------+
| Status                 | Duration |
+------------------------+----------+
| Starting               | 0.000085 |
| checking permissions   | 0.000012 |
| Opening tables         | 0.000119 |
| After opening tables   | 0.000006 |
| System lock            | 0.000002 |
| table lock             | 0.000014 |
| creating table         | 0.062390 |
| After create           | 0.041476 |
| Query end              | 0.000020 |
| Commit                 | 0.000006 |
| closing tables         | 0.000007 |
| Unlocking tables       | 0.000005 |
| closing tables         | 0.000004 |
| Commit implicit        | 0.000012 |
| Starting cleanup       | 0.000006 |
| Freeing items          | 0.000008 |
| Updating status        | 0.000063 |
| Reset for next command | 0.000006 |
+------------------------+----------+
18 rows in set (0.001 sec)

Docker results:

+----------+------------+--------------------------+
| Query_ID | Duration   | Query                    |
+----------+------------+--------------------------+
|        1 | 0.01055567 | DROP TABLE IF EXISTS t1  |
|        2 | 0.00028742 | CREATE TABLE T1 (id INT) |
+----------+------------+--------------------------+
+------------------------+----------+
| Status                 | Duration |
+------------------------+----------+
| Starting               | 0.000208 |
| checking permissions   | 0.000015 |
| Opening tables         | 0.000027 |
| After opening tables   | 0.000003 |
| closing tables         | 0.000004 |
| Query end              | 0.000003 |
| Rollback               | 0.000002 |
| closing tables         | 0.000002 |
| Commit implicit        | 0.000002 |
| Starting cleanup       | 0.000002 |
| Freeing items          | 0.000003 |
| Updating status        | 0.000015 |
| Reset for next command | 0.000003 |
+------------------------+----------+
13 rows in set (0.001 sec)

What could slow down performance in Native version? Thanks for your help.

2
  • Your Docker Results looks like the profile for DROP TABLE IF EXIST and your Native is for CREATE TABLE (notably because of 'creating table'). I tested the Docker Library container of 10.7.3 (x86_64) and DROP TABLE showed the "System lock" and "table lock" in the profile too. My "After create" on native Linux was ~10% of the "creating table" time. There's an aspect of MAC docker being a Linux VM with shared storage which I'd expect to be slower than Native. But first, lets make sure we are measuring the same on both. Commented May 23, 2022 at 1:57
  • I concur the issue. And just to compare I ran the same queries on AWS RDS MariaDB. DROP TABLE IF EXISTS t1 - 0.00032200, CREATE TABLE T1 (id INT) - 0.00921476 Commented Oct 30, 2022 at 18:57

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.