CoreOS Single Container High Memory Usage

So I have a simple Go web app I deployed as a Docker container. I am running a t2.small instance on AWS with CoreOS AMI.

The container is very small, only using about 10MB of memory according to docker stat:

  • Can't connect with BOLT to a docker Neo4j
  • No executable found matching command “dotnet-/../.dll” when running dotnet core docker image in Azure Web App on Linux
  • How to set build context for docker when deploying to GAE
  • Limiting access to Docker Hub
  • Creating docker container with HP UX and IBM AIX
  • Running docker Ubuntu image on Debian enironment
  • CONTAINER           CPU %               MEM USAGE / LIMIT     MEM %               NET I/O               BLOCK I/O
    8e230506e99a        0.00%               11.11 MB / 2.101 GB   0.53%               49.01 MB / 16.39 MB   1.622 MB / 0 B
    

    However the CoreOS instance seems to be using a lot of memory:

    $ free
                 total       used       free     shared    buffers     cached
    Mem:       2051772    1686012     365760      25388     253096    1031836
    -/+ buffers/cache:     401080    1650692
    Swap:            0          0          0
    

    As you can see it’s using almost 1.7GB of memory of its 2GB total memory with only about 300MB left. And this seems to be slowly getting worse.

    I’ve had the instance running for about 3 days now and the free memory started at around 400MB after fresh launch and starting a single Docker container.

    Is this something I should worry about? Or is CoreOS supposed to use so so much memory when my little Go app in a container only uses tiny 10MB.

  • Execution commands between two dockers containers
  • Problems when executing services within cron in a Docker container?
  • Using docker environment variables in docker-compose run commands
  • How to deploy an IPv6 container with Docker Swarm Mode or Docker Compose
  • How do you set an ssh key for docker image containing a private git repo?
  • Docker - Use IP instead of --link for communication
  • One Solution collect form web for “CoreOS Single Container High Memory Usage”

    Because a lot of that memory usage is buffers and cache. The better indicator is your application from Docker (which is likely close if it is a small Go app) and the OS total usage minux buffers and cache on the second line (which is closer to 400 MB used).

    See https://unix.stackexchange.com/a/152301/6515 for a decent explanation.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.