<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hey folks,</div>
<div><br>
</div>
<div>Playing with from source builds and comparing them to from binary builds, I noticed our binary images are much larger:</div>
<div><br>
</div>
<div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">From source:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">kollaglue/centos-source-<span style="color: rgb(195, 55, 32);"><b>magnum</b></span>-api latest f822f446c882 About a minute ago 510.8 MB</p>
<div><span style="font-family: Menlo; font-size: 11px;">kollaglue/centos-source-</span><span style="font-family: Menlo; font-size: 11px; color: rgb(195, 55, 32);"><b>magnum</b></span><span style="font-family: Menlo; font-size: 11px;">-conductor </span><span style="font-family: Menlo; font-size: 11px;">
</span><span style="font-family: Menlo; font-size: 11px;">latest</span><span style="font-family: Menlo; font-size: 11px;"> </span><span style="font-family: Menlo; font-size: 11px;">3246e8e4de5f</span><span style="font-family: Menlo; font-size: 11px;">
</span><span style="font-family: Menlo; font-size: 11px;">13 seconds ago </span><span style="font-family: Menlo; font-size: 11px;"> </span><span style="font-family: Menlo; font-size: 11px;">611.5 MB</span></div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">From RPMS:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">kollaglue/centos-rdo-<span style="color: rgb(195, 55, 32);"><b>magnum</b></span>-api latest afe5f2e17a8b 25 hours ago 799.5 MB</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">kollaglue/centos-rdo-<span style="color: rgb(195, 55, 32);"><b>magnum</b></span>-conductor latest 9e9bebe32cce 25 hours ago 900.3 MB</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">I spent some time using docker save to inspect the magnum-api container to understand why it is larger:</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;"><br>
</p>
<div>Binary Docker layers greater then 1MB.</div>
<div><span style="font-family: Menlo; font-size: 11px;">[sdake@bigiron binary]$ find . -name layer.tar -exec ls -l --block-size=M {} \; | grep -v " 1M"</span></div>
<div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 87M Jul 16 16:10 ./0213734c419955d6f1029b435d9fcf419245c00cb5a77c9ae764c8cf96fc659c/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 16M Jul 16 16:10 ./1f832dd654080a43cefffde22f0046182586c1a05932007e1ff6ae1ed1454dee/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 172M Jul 16 16:10 ./c852f6d61e65cddf1e8af1f6cd7db78543bfb83cdcd36845541cf6d9dfef20a0/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 348M Jul 16 16:10 ./a76b544b34aefbdbcf878f3ad95a1c23476d6d3b2a20321e81f6f9dd597d5409/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 35M Jul 16 16:10 ./e0f5d6e410c4937ac850993215efb429644bb8c1cfc4422635cdea34ec1654fe/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 16M Jul 16 16:10 ./c022916a3ca58e2cb2e8db3dc57c8db677e8f64ab4a05dc3fce34f1b15bb4d99/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 21M Jul 16 16:10 ./844b2a066e8ef928881c8fca24b7b639913b9967200b19a8dc4c7a88475dcf0c/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 16M Jul 16 16:10 ./193a33211e9110529208a6e1349f20cfcb9c93b47d392537cbd9d3905a5d75e1/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 16M Jul 16 16:10 ./256ed6bc68ce83fdd78eb947f78e4fcb72bf9345251ab8e273eab18a5baefe8d/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 19M Jul 16 16:10 ./41eae04e7c365fea3e721fe1f912ff4c65b082f85a5c7fc86e11b14c1899c111/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 52M Jul 16 16:10 ./6788dec069486207cdd1e9070a07f5ee98306ac275fdb4be2230c33faff11b73/layer.tar</p>
</div>
<div><br>
</div>
<div>Source Docker layers greater then 1MB.</div>
<div>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">[sdake@bigiron source]$ find . -name layer.tar -exec ls -l --block-size=M {} \; | grep -v " 1M"</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 172M Jul 16 16:09 ./c852f6d61e65cddf1e8af1f6cd7db78543bfb83cdcd36845541cf6d9dfef20a0/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 73M Jul 16 16:09 ./81e4a7bb1da0bb00bdd112954a59a6148f22d36152767fab80405fc9ae7c4699/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 21M Jul 16 16:09 ./85d98ac00f6e796b1be37d53436907539fac054c7231738b838f16b9a4bbc520/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 16M Jul 16 16:09 ./6b1050b734d731171096bb2000283cf4e3cd3098d9e9b9cd11f43a3304262275/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 225M Jul 16 16:09 ./06fb8350c94e0d7b1b1c35b9eec4b462b920ba077bdecde33db8ada7921b6264/layer.tar</p>
<p style="margin: 0px; font-size: 11px; font-family: Menlo;">-rw-r--r-- 1 sdake sdake 6M Jul 16 16:09 ./eea0d597fd6e40a30c67b712238a037efa0725b7260cefa0ff8c2714c47bb5d8/layer.tar</p>
</div>
<div><br>
</div>
<div>Layers:</div>
<div>Binary</div>
<div>87M 0213: magnum and some of its dependencies (those not in the common layer)</div>
<div>172M c852: centos</div>
<div>348M a756: a whole lot of python deps</div>
<div><br>
</div>
<div>source:</div>
<div>172M c852 : centos</div>
<div>73M 81e4 magnum and all its python dependencies</div>
<div>225M 06fb: C toolchain and all its dependencies</div>
</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Regards</div>
<div>-steve</div>
<div><br>
</div>
</body>
</html>