mssql-docker
mssql-docker copied to clipboard
Very slow performance MSSQL2022 on Docker via Synology, low CPU usage
I would like to ask for advice regarding very slow performance of database. I noticed that whatever I am doing the CPU on docker container is always below 1% of utilization. I set up priority on high and alocated 4GB of memory.This low utilization of CPU is caused I think low performance. Uploading the database files around 265MB takes ages. This is my docker-compose file config:
version: "3.9" services: db: container_name: mssql2022 image: mcr.microsoft.com/mssql/server:2022-latest environment: ACCEPT_EULA: Y SA_PASSWORD: mypassword MSSQL_PID: Express TZ: Europe/Warsaw MSSQL_LCID: 1045 MSSQL_AGENT_ENABLED: Y MSSQL_DATA_DIR: /var/opt/mssql/data MSSQL_LOG_DIR: /var/opt/mssql/log MSSQL_BACKUP_DIR: /var/opt/mssql/backup MSSQL_SECRETS_DIR: /var/opt/mssql/secrets ports: - 1433:1433 volumes: - /volume1/docker/mssql2022/data:/var/opt/mssql/data - /volume1/docker/mssql2022/log:/var/opt/mssql/log - /volume1/docker/mssql2022/secrets:/var/opt/mssql/secrets - /volume1/docker/mssql2022/backup:/var/opt/mssql/backup
Other services and dockers containers work very well. (AdGuard, UniFi conntroler)
For any advice I will be very grateful,
Thanks
Michael,
Hard to say... if the storage is spinning disks, then the read-write could just be relatively slow compared to SSD, which you may be more used to. Do you have a cache drive (nvme) option for your Synology box? That might help a bit.
Haven't tried running SQL on my Synology box, but it should run reasonably... Have you tried the SQL Edge image to see how that runs by comparison? Assuming you don't have features in full SQL that aren't in the Edge image that is.
Hi, thank you for your answer. Device which I am using is DS720+ with two Seagate IronWolf ST4000VN008 drives, so the disks are spinning. I tried SQL Edge and the results is the same. I have to mention that to connect to that database I am using Open VPN, but other services even coping files over the VPN work quite well. I understand that hdds are slower than SSD and connection is over VPN but in my opinion is significant to slow. Internet connection speed is 300/30 Mb/s and I am using DDNS via Cloudlflare. I will be looking further. I found this:
https://stackoverflow.com/questions/70828023/microsoft-sql-server-2017-2019-on-docker-container-slow-performance
but I do not know how to try and add to the config.
@MajkelP can you try disabling other tasks that would be using the drives or add a dedicated drive to ensure it's not an issue with too many seeks occurring on the drives?