Docker Community Forums

Share and learn in the Docker community.

Storage question on aws EC2 instance

aws

(Kgtech) #1

Hello,

I’ve recently tested amazon’s free tier with docker cloud, to get the feeling of how it works.

I tested with some services like wordpress, mysql and some own images, and got suddenly surprised by a small billing from amazon. Details showed I had used my free tie storage of 30Gb, which seems a bit `

# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            486M   12K  486M   1% /dev
tmpfs           100M  1.1M   99M   2% /run
/dev/xvda1      7.8G  1.2G  6.2G  16% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            497M  416K  496M   1% /run/shm
none            100M     0  100M   0% /run/user
/dev/xvdb        59G  2.6G   54G   5% /var/lib/docker
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/2b9e3fe7a2617971b2c7f7ba9b0c3e0804924566d9e0bd75b1a07537e4a35c7c
shm              64M     0   64M   0% /var/lib/docker/containers/49a83f41a675ac238e953e9a7aabb1010cf41f0ab51566599834bee5da958251/shm
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/38458a79b29087958deadf6c642ef22193068b170f0ec83f6f82cbfbd447bd9c
shm              64M     0   64M   0% /var/lib/docker/containers/3ac992f127bf6026edcc851aa878e110041b4e791eb1725b7b6ea897831ab150/shm
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/e3d9bbd18eec23ddd699d83c69ab62e0ef7821d2c6b3f4cbfbe6b4cb142311c8
shm              64M     0   64M   0% /var/lib/docker/containers/1fc2218e9873137712c3bd9a578cfe1206cfb7312df26b48ad31d51475bcc651/shm
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/0d2aedae39acc4cddd623793931eb41088290c2a60394ae22d44b73ada004e59
shm              64M     0   64M   0% /var/lib/docker/containers/508065bb769a5553549f4a0238393337ad7a39f9679d5e2379188868d03d7d61/shm
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/1e1af5d605caa7dcb8c497a9325661e0d570bd6629c758743bd64eb3b41f793e
shm              64M     0   64M   0% /var/lib/docker/containers/668742a1a1c4f56bd980de4bab0c223d6d82b45e049fa067b0e800487890f077/shm
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/35f09cb2ea225e9d2b7ac67539e831e8f6f82f0072b5948bc5513998237e9023
shm              64M     0   64M   0% /var/lib/docker/containers/de1d38774ca191692c78ccd210abb3593f2ea7f96734871b57e788c90cd2a438/shm
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/529c01350bdce5047186d3aeffe65131dbd33276b5a8ace1510219235c51eaa7
shm              64M     0   64M   0% /var/lib/docker/containers/a73f12c0b225183c8c6171dfbdce917760b8ee43b447357b1e9e6f047de1af3c/shm
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/520725de6f2c2924507a47dd74a5f89cb85bfa29876189367fca95d5fce96d56
shm              64M     0   64M   0% /var/lib/docker/containers/c31aff2bd94c2a23c90c5043c5daac7c188425dddeb8cf55a62c6e62cd02f82a/shm
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/2845fe0336b04f8a24dbeb3f2268b5ac4927483f326b4134ef48c9da0c3743fb
shm              64M     0   64M   0% /var/lib/docker/containers/9ab3e490b9bb8a69c6621d0e6846676e71cadcf1d62e7073c702e63135896465/shm
none             59G  2.6G   54G   5% /var/lib/docker/aufs/mnt/0576f6f995bf8fbd89110f5396fc627a1e31edecc94bdffbd45a0e53f59159da
shm              64M     0   64M   0% /var/lib/docker/containers/1ecceebcd3c2dc2c88c2502d15a24c4b523135e41b330d49b6317fe7f4fcd06f/shm

`

Many mount points are estimated to 2.6G although they are not :

121M    /var/lib/docker/aufs/mnt   /2b9e3fe7a2617971b2c7f7ba9b0c3e0804924566d9e0bd75b1a07537e4a35c7c
27M    /var/lib/docker/aufs/mnt/38458a79b29087958deadf6c642ef22193068b170f0ec83f6f82cbfbd447bd9c
79M    /var/lib/docker/aufs/mnt/e3d9bbd18eec23ddd699d83c69ab62e0ef7821d2c6b3f4cbfbe6b4cb142311c8
91M    /var/lib/docker/aufs/mnt/0d2aedae39acc4cddd623793931eb41088290c2a60394ae22d44b73ada004e59
5.1M    /var/lib/docker/aufs/mnt/1e1af5d605caa7dcb8c497a9325661e0d570bd6629c758743bd64eb3b41f793e
12M    /var/lib/docker/aufs/mnt/35f09cb2ea225e9d2b7ac67539e831e8f6f82f0072b5948bc5513998237e9023
5.9M    /var/lib/docker/aufs/mnt/529c01350bdce5047186d3aeffe65131dbd33276b5a8ace1510219235c51eaa7
12M    /var/lib/docker/aufs/mnt/520725de6f2c2924507a47dd74a5f89cb85bfa29876189367fca95d5fce96d56
384M    /var/lib/docker/aufs/mnt/2845fe0336b04f8a24dbeb3f2268b5ac4927483f326b4134ef48c9da0c3743fb
792M    /var/lib/docker/aufs/mnt/0576f6f995bf8fbd89110f5396fc627a1e31edecc94bdffbd45a0e53f59159da

Would someone have an idea about this ? is this normal ? or is there a way to fix it ?

Regards

Mikael


(Mariner) #2

Hi, how did you get around with this problem? What was the reason of such oversize?


(David Maze) #3

Docker’s use of filesystems is…complicated. It looks to me like the OP mounted a dedicated disk for /var/lib/docker and that’s lightly used

/dev/xvdb        59G  2.6G   54G   5% /var/lib/docker

I’d ignore all of the various subdirectories of /var/lib/docker and their associated mounts, they’re complex implementation details that will vary by storage driver. The part where there are a lot of lines that look like they have identical utilization really are identical, for instance, and you shouldn’t try to count them multiple times.

I wouldn’t worry about this.