Replies: 1 comment 12 replies
-
What setup do you use? A single shared instance or multiple parallel instances? How do you access the database? With the native client? What is the MSSQL max server memory? @kiview @eddumelendez Do you have ideas or maybe made experiences that could reduce the container performance? |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have started to look into using Docker containers in general for supporting all of our integration and benchmark testing projects due to the ease of use for us as developers (not having to configure databases locally and manage connection strings, worrying about ports, etc.). This is really cool, but we have unfortunately also experienced a degradation in performance of all testing projects that involve MsSql databases hosted in Docker containers.
This is not an issue with testcontainers, since we experience the same degradation when simply using Docker compose to prepare our databases.
To give an example, we have certain database-heavy integration tests that went from executing in 1.5 seconds when the database was installed natively on the host, to spending 5-6 seconds when the database was in a Docker container.
We also have some benchmark tests that are extremely database-heavy, and here we see a performance degradation of a factor 10.
Here is some additional information for context:
mcr.microsoft.com/mssql/server:2019-CU11-ubuntu-20.04
We suspect there is some form of overhead, perhaps related to the Windows file system of the host, which affects the performance of our tests when using a Docker container to host our databases. Certain things we have tried so far:
WithPrivileged
flag on the Docker container, with little to no measurable impact on performanceBut we would really like to hear if anyone else in the community has experienced any performance issues when running any type of SQL server in a Docker container, and what, if anything, they have done to improve upon this!
Beta Was this translation helpful? Give feedback.
All reactions