microsoft / mssql-docker

Official Microsoft repository for SQL Server in Docker resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Massive virtual memory usage while running linux container with only one DB

H-K-47 opened this issue · comments

linux top shows me anything between 14GB and 21GB for my docker instance and only about 1 to 1.5GB of physical memory.

There is at least 4GB free which seems not to be used on the host (from a total 16GB).

There is only one DB on the server - creating a new server instance on another hardware with a backup of the database will result in less than 1GB of virtual memory.

I'm observing massive slow downs / read resource sometimes where cpu usage for that instance is over 100% :
session_id wait_type wait_time_ms


   107 RESOURCE_SEMAPHORE                                                  19048
   108 RESOURCE_SEMAPHORE                                                  47049

Hence why I'm investigating this instance at all. I believe the indicator of virtual memory means that massive swapping is occurring but i don't understand why, docker instance isn't even utilizing more memory just using 1-2GB max

There are not even many transactions happening during the day, it's just a test database with about 200k person records (name, address etc) and some nightly jobs going through each record.

To repeat:

  1. Virtual Memory Usage seems to be just wrong, I'm puzzled.
  2. Creating a new sqlserver from docker on another server and restoring the DB seems to have no issues and normal memory usage.

I don't see any errors in the error log file.