microsoft / mssql-docker

Official Microsoft repository for SQL Server in Docker resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performance difference vs Windows Instance

chrismcv opened this issue · comments

Hi,
I've been migrating my Windows instance over to containerd on WSL2. I'm finding there is quite a performance difference between the two.

I've a dotnet core executable which provisions a database and runs scripts (about 4MB worth) on it. On windows it takes 28s to run, against the docker image it takes 1m5s. I've tried running the client from both WSL (1m5s) and from Windows(1m4.9s), and see similar issues.

My command to run up the instance is:

	nerdctl run -d --name sql -e 'MSSQL_PID: Developer' -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=apassword' -p 2198:1433 -v .sql-data/data:/var/opt/mssql/data mcr.microsoft.com/mssql/server:latest

Can anyone shed any light on how to diagnose this?

Thanks,
Chris

Hi, are the resources given to both WSL and Windows instance the same? Overall the SQL Server engine is the same when you run on Windows or Linux. Also, what is the storage associated with the database when you are using the WSL2, can you try SQL Server on dedicated Linux VM or container and then see if the same issue exists. SQL on WSL 2 is currently not supported for production or equivalent workload.

Hi @amitkh-msft, yes, this is running on the same machine, and there is plenty of headroom in capacity for resource not to be the issue. Storage wise, both are running on the same NVMe SSD. For WSL2, its using the default file system and a folder in my home directory, so would be on the virtualised ext4 filesystem. I can't really run it on a like for like dedicated VM, and a different VM might reduce clarity further? I'm using this for my dev environment, so lack of production support isn't an issue as such.