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

You can run cmd.exe to get a command window from which you can execute SSH commands. However, my personal...
Replies
36
Views
3,525
Gluetun works fine. I'm using it both for several other containers, and for proxying my browser through my...
Replies
3
Views
434
Thanks... I tried something similar with rsync. The docker volume lived in...
Replies
7
Views
619
I can’t find any option to restore just the settings. 1710356648 Phew, managed to fix it. Within the...
Replies
4
Views
502
Good to hear. Deluge has not been updated for almost two years now as an app, nevertheless. But it gives...
Replies
12
Views
1,104
  • Question
Open an issue on that GitHub page. The developers will be glad to assist. OP has posted two threads on...
Replies
5
Views
1,095

Welcome to SynoForum.com!

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

Registration is free, easy and fast!

Trending threads

Back
Top