DSM 7.1 MariaDB on Docker is much slower than MariaDB package

Currently reading
DSM 7.1 MariaDB on Docker is much slower than MariaDB package

18
5
Last edited:
There is a DS1621xs+ with NVMe SSD cache, equipped with 24 GB RAM.

There is a MariaDB10 server running on Docker.

I have an identical database running on the MariaDB10 package. (Dumped and copied from the Docker instance.)

Queries on the database of the MariaDB10 package run much faster than on the docker instance. Difference is at least 2.5x, but on some queries it is 20x.

What might be the reason of this huge perfomance difference, why are the queries slower on Docker than on the Synology Package version of MariaDB?
 
Solution
I haven't thought about it as a file system level cache. If it is, it would make sense that both benefit from it. Like you, I am not an export on this topic either. But with Synology there is a strong tendency to modify open source code to support scenarios they need.
Wondering if it is anything to do with the container's resource settings for CPU Priority and Memory Limit.
That was my first idea, too, but allocating basically all my RAM (24GB to a 200 MB database) and giving highest CPU priority didn't help.
-- post merged: --

Could also be tweaks in an option group in one of the option files.
Before you ask: I have no idea where the files are located on DSM.
I tried that, too: I found where it was located for the package and copied all the relevant data to the docker version. No help.
 
Upvote 0
If the containerized and native mariadb instances use the same configuration, store the same data (and same indexes!) on the same physical volume, and are both fresh started (to avoid interference from cached query results), I would expect the containerized version to be marginally slower, but not by factor 2,5,

I doubt the native mariadb instance actually benefits from the nvme cache. A containerized mariadb will most definitely not benefit from it.
 
Upvote 0
If the containerized and native mariadb instances use the same configuration, store the same data (and same indexes!) on the same physical volume, and are both fresh started (to avoid interference from cached query results), I would expect the containerized version to be marginally slower, but not by factor 2,5,

I doubt the native mariadb instance actually benefits from the nvme cache. A containerized mariadb will most definitely not benefit from it.
Yes, indexes are the same, too.
Regarding the NVMe SSD Cache: Actually Synology recommends the SSD cache to database usage, so I guess it helps at least the native package. I don't really see why the containerized mariadb would not benefit from it - the data folder is mapped to the host - , but I'm not an expert in this topic, so I might be wrong.
 
Upvote 0
I haven't thought about it as a file system level cache. If it is, it would make sense that both benefit from it. Like you, I am not an export on this topic either. But with Synology there is a strong tendency to modify open source code to support scenarios they need.
 
Upvote 0
Solution

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

I'm not sure why I get that 172.17-address or if there's a way to change that...?
Replies
20
Views
6,135
Frustrating indeed. I will read further and try to discover what is all about. Thanks for your sincere...
Replies
20
Views
8,341
I registered and want to post this for the sake of anyone who might come along looking for answers like I...
Replies
10
Views
13,383
You can run cmd.exe to get a command window from which you can execute SSH commands. However, my personal...
Replies
36
Views
2,968
I can’t find any option to restore just the settings. 1710356648 Phew, managed to fix it. Within the...
Replies
4
Views
390

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top