[openstack-dev] [kolla] image bloat

Robert Collins robertc at robertcollins.net
Fri Jul 17 03:59:54 UTC 2015


On 17 July 2015 at 15:49, Steven Dake (stdake) <stdake at cisco.com> wrote:
>
>
> From: Robert Collins <robertc at robertcollins.net>
> Reply-To: "OpenStack Development Mailing List (not for usage questions)"
> <openstack-dev at lists.openstack.org>
> Date: Thursday, July 16, 2015 at 6:48 PM
> To: OpenStack Development Mailing List <openstack-dev at lists.openstack.org>
> Subject: Re: [openstack-dev] [kolla] image bloat
>

> Rob,
>
> We don’t use pip during deployment as it results in an uncontrolled
> deployment mechanism.  Instead we pre-build containers and rely on an atomic
> deployment (either the container deploys or doesn’t, vs using pip during
> deployment, where some could fail and some could succeed).  Pre-building is
> more deterministic, but images must be build.

sure- I wasn't suggesting a change to install-at-deploy [you know my
views on deploys better than that!].

> Using pip is slower then yum when installing packages.  Most of this has to
> do with invocation of the c compiler for various modules (lxml is an example
> that takes awhile).

With the wheel cache introduced in 7.0.3, you may find that that has
changed [particularly if the build environment can map in a persistent
cache rather than having to start one in the lowest Docker layer].
Installing all the dependencies of OpenStack via pip (including the
oslo.* libraries):
cold [but not empty] cache:
time pip install -r global-requirements.txt
real    2m31.990s
user    1m15.969s
sys     0m9.111s

hot cache:
real    1m15.698s
user    1m6.497s
sys     0m7.549s

E.g. nearly all the time difference was network latency, revalidating
or downloading index data.

> What I actually proposed in the above email was getting rid of our common
> dependency layer where yum is only used one time during the build.  This
> would be replaced by using yum for each container (* 40 or so containers
> *100 or so dependencies).  We already do this for from-source, but not
> from-binary container building.

Ah ok, I understand now - thanks!

-Rob

-- 
Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud



More information about the OpenStack-dev mailing list