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:

  • How to run Arangodb on Openshift?
  • Docker alpine image's basic commands are not working
  • Can I maintain the state of a docker container without commiting
  • docker docker0 and container broadcast addresses not set
  • How can I add hostnames to a container on the same docker network?
  • Persistent postgres on docker
  • 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.

  • Automatic building and installing Packages from AUR for Arch Linux inside Docker with yaourt and >makepkg-4.2.0
  • Find the docker containers using an image?
  • install/access executable for existing docker container
  • Run docker after building own image
  • Swift SQLClient connect to my local mssql database gives me error O Linker Error “_iconv”
  • Spring cloud config server : ssh connection to private config repo
  • 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.