[openstack-dev] [kolla] image bloat
Steven Dake (stdake)
stdake at cisco.com
Fri Jul 17 00:30:02 UTC 2015
Hey folks,
Playing with from source builds and comparing them to from binary builds, I noticed our binary images are much larger:
>From source:
kollaglue/centos-source-magnum-api latest f822f446c882 About a minute ago 510.8 MB
kollaglue/centos-source-magnum-conductor latest 3246e8e4de5f 13 seconds ago 611.5 MB
>From RPMS:
kollaglue/centos-rdo-magnum-api latest afe5f2e17a8b 25 hours ago 799.5 MB
kollaglue/centos-rdo-magnum-conductor latest 9e9bebe32cce 25 hours ago 900.3 MB
I spent some time using docker save to inspect the magnum-api container to understand why it is larger:
Binary Docker layers greater then 1MB.
[sdake at bigiron binary]$ find . -name layer.tar -exec ls -l --block-size=M {} \; | grep -v " 1M"
-rw-r--r-- 1 sdake sdake 87M Jul 16 16:10 ./0213734c419955d6f1029b435d9fcf419245c00cb5a77c9ae764c8cf96fc659c/layer.tar
-rw-r--r-- 1 sdake sdake 16M Jul 16 16:10 ./1f832dd654080a43cefffde22f0046182586c1a05932007e1ff6ae1ed1454dee/layer.tar
-rw-r--r-- 1 sdake sdake 172M Jul 16 16:10 ./c852f6d61e65cddf1e8af1f6cd7db78543bfb83cdcd36845541cf6d9dfef20a0/layer.tar
-rw-r--r-- 1 sdake sdake 348M Jul 16 16:10 ./a76b544b34aefbdbcf878f3ad95a1c23476d6d3b2a20321e81f6f9dd597d5409/layer.tar
-rw-r--r-- 1 sdake sdake 35M Jul 16 16:10 ./e0f5d6e410c4937ac850993215efb429644bb8c1cfc4422635cdea34ec1654fe/layer.tar
-rw-r--r-- 1 sdake sdake 16M Jul 16 16:10 ./c022916a3ca58e2cb2e8db3dc57c8db677e8f64ab4a05dc3fce34f1b15bb4d99/layer.tar
-rw-r--r-- 1 sdake sdake 21M Jul 16 16:10 ./844b2a066e8ef928881c8fca24b7b639913b9967200b19a8dc4c7a88475dcf0c/layer.tar
-rw-r--r-- 1 sdake sdake 16M Jul 16 16:10 ./193a33211e9110529208a6e1349f20cfcb9c93b47d392537cbd9d3905a5d75e1/layer.tar
-rw-r--r-- 1 sdake sdake 16M Jul 16 16:10 ./256ed6bc68ce83fdd78eb947f78e4fcb72bf9345251ab8e273eab18a5baefe8d/layer.tar
-rw-r--r-- 1 sdake sdake 19M Jul 16 16:10 ./41eae04e7c365fea3e721fe1f912ff4c65b082f85a5c7fc86e11b14c1899c111/layer.tar
-rw-r--r-- 1 sdake sdake 52M Jul 16 16:10 ./6788dec069486207cdd1e9070a07f5ee98306ac275fdb4be2230c33faff11b73/layer.tar
Source Docker layers greater then 1MB.
[sdake at bigiron source]$ find . -name layer.tar -exec ls -l --block-size=M {} \; | grep -v " 1M"
-rw-r--r-- 1 sdake sdake 172M Jul 16 16:09 ./c852f6d61e65cddf1e8af1f6cd7db78543bfb83cdcd36845541cf6d9dfef20a0/layer.tar
-rw-r--r-- 1 sdake sdake 73M Jul 16 16:09 ./81e4a7bb1da0bb00bdd112954a59a6148f22d36152767fab80405fc9ae7c4699/layer.tar
-rw-r--r-- 1 sdake sdake 21M Jul 16 16:09 ./85d98ac00f6e796b1be37d53436907539fac054c7231738b838f16b9a4bbc520/layer.tar
-rw-r--r-- 1 sdake sdake 16M Jul 16 16:09 ./6b1050b734d731171096bb2000283cf4e3cd3098d9e9b9cd11f43a3304262275/layer.tar
-rw-r--r-- 1 sdake sdake 225M Jul 16 16:09 ./06fb8350c94e0d7b1b1c35b9eec4b462b920ba077bdecde33db8ada7921b6264/layer.tar
-rw-r--r-- 1 sdake sdake 6M Jul 16 16:09 ./eea0d597fd6e40a30c67b712238a037efa0725b7260cefa0ff8c2714c47bb5d8/layer.tar
Layers:
Binary
87M 0213: magnum and some of its dependencies (those not in the common layer)
172M c852: centos
348M a756: a whole lot of python deps
source:
172M c852 : centos
73M 81e4 magnum and all its python dependencies
225M 06fb: C toolchain and all its dependencies
The bloat on the from-source comes from the C toolchain. The bloat on the binary images comes from our common dependency layer. We can probably just get rid of all the Python dependency installs that occur in the common layer and make things a whole lot faster when deploying at large node scales although it may negatively impact build speed.
Regards
-steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150717/3358a768/attachment.html>
More information about the OpenStack-dev
mailing list