title: docker out of memory
body: <p>I'm new to docker and have a problem with existing scripts that work on one machine but not on another. I'm willing to read documentation and existing answers but am a little lost on the many levels of abstraction in this topic.</p>
  
  <p>Running an application in docker results in an out of memory exception.  I start docker with <code>--ulimit memlock -1:-1</code> and no other limit on memory seems to be applied. </p>
  
  <p><code>df -h</code> inside docker yields</p>
  
  <pre><code>root@localhost:/# df -h
  Filesystem                                                                                         Size  Used Avail Use% Mounted on
  /dev/mapper/docker-253:0-1312128-9219e5dbff0bc6da3a663fab31ec34e6f6b28ba6c8fbd3b343d9131d41f6b1c9   10G  3.0G  7.1G  30% /
  tmpfs                                                                                              3.9G     0  3.9G   0% /dev
  tmpfs                                                                                              3.9G     0  3.9G   0% /sys/fs/cgroup
  /dev/mapper/fedora-root                                                                             50G   20G   28G  42% /etc/hosts
  /dev/mapper/fedora-home                                                                            401G  151G  231G  40% /var/results
  shm                                                                                                 64M     0   64M   0% /dev/shm
  </code></pre>
  
  <p>When the OOM occurs, the first file system is used to 95%.  Where does this limit 10G come from? Where could I adjust it?</p>
  
  <p>All partitions of my device surely have enough free space.</p>
  
  <pre><code>[uscholz@localhost RegressionTesting]$ docker info
  Containers: 2
   Running: 1
   Paused: 0
   Stopped: 1
  Images: 52
  Server Version: 1.10.3
  Storage Driver: devicemapper
   Pool Name: docker-253:0-1312128-pool
   Pool Blocksize: 65.54 kB
   Base Device Size: 10.74 GB
   Backing Filesystem: xfs
   Data file: /dev/loop0
   Metadata file: /dev/loop1
   Data Space Used: 12.17 GB
   Data Space Total: 107.4 GB
   Data Space Available: 32.16 GB
   Metadata Space Used: 7.889 MB
   Metadata Space Total: 2.147 GB
   Metadata Space Available: 2.14 GB
   Udev Sync Supported: true
   Deferred Removal Enabled: false
   Deferred Deletion Enabled: false
   Deferred Deleted Device Count: 0
   Data loop file: /var/lib/docker/devicemapper/devicemapper/data
   WARNING: Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
   Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
   Library Version: 1.02.122 (2016-04-09)
  Execution Driver: native-0.2
  Logging Driver: journald
  Plugins: 
   Volume: local
   Network: bridge null host
  Kernel Version: 4.8.12-200.fc24.x86_64
  Operating System: Fedora 24 (Twenty Four)
  OSType: linux
  Architecture: x86_64
  Number of Docker Hooks: 2
  CPUs: 8
  Total Memory: 7.787 GiB
  Name: localhost.localdomain
  ID: YXHN:34PG:ZQA3:P4DU:4TFY:6THC:VFI2:E7BE:IGOW:2TTH:3BS7:3OOD
  Registries: docker.io (secure)
  </code></pre>