title: Docker: How to increase the size of tmpfs volumes?
body: <p>I observed that the size of the <code>tmpfs</code> volumes created by <code>docker</code> is roughly half the size of the machine's physical memory.</p>
  
  <p>For example, on a machine with 22GB of RAM, I got this:  </p>
  
  <pre><code>Filesystem      Size  Used Avail Use% Mounted on
  overlay         970G  130G  840G  14% /
  tmpfs            64M     0   64M   0% /dev
  tmpfs            12G     0   12G   0% /sys/fs/cgroup
  tmpfs            20G     0   20G   0% /ramdisk
  /dev/sda1       970G  130G  840G  14% /etc/hosts
  tmpfs            12G  180K   12G   1% /dev/shm
  tmpfs            12G     0   12G   0% /proc/acpi
  tmpfs            12G     0   12G   0% /proc/scsi
  tmpfs            12G     0   12G   0% /sys/firmware
  </code></pre>
  
  <p>I would like to increase this size. Could anybody please tell me how to do that?</p>
  
  <p>Thank you very much in advance for your help!</p>
  
  <p><strong>Update:</strong> Let me add some context to this question.</p>
  
  <p>In my docker I have a <code>/ramdisk</code> volume whose size is large (here 20GB) because one of my programs needs that:</p>
  
  <pre><code>nvidia-docker run --ipc=host -h $HOSTNAME --mount type=tmpfs,destination=/ramdisk,tmpfs-mode=1770,tmpfs-size=21474836480
  </code></pre>
  
  <p>When running the program, at the moment its memory usage surpasses 12GB of <code>ramdisk</code>, it crashes (while <code>ramdisk</code> still has 8GB left). Note that 12GB is the size of the other <code>tmpfs</code> system volumes.</p>
  
  <p>So, one solution I could think of is to increase the size of those other volumes, which is my question.</p>