[openstack-dev] [devstack] Why do we apt-get install NEW files/debs/general at job time ?
iwienand at redhat.com
Tue Sep 19 20:14:31 UTC 2017
On 09/19/2017 11:03 PM, Jeremy Stanley wrote:
> On 2017-09-19 14:15:53 +0200 (+0200), Attila Fazekas wrote:
>> The jobs does 120..220 sec apt-get install and packages defined
>> /files/debs/general are missing from the images before starting the job.
> Is the time spent at this stage mostly while downloading package
> files (which is what that used to alleviate) or is it more while
> retrieving indices or installing the downloaded packages (things
> having them pre-retrieved on the images never solved anyway)?
As you're both aware, but others may not be, at the end of the logs
devstack does keep a timing overview that looks something like
DevStack Component Timing
Total runtime 1352
That doesn't break things down into download v install, but apt does
have download summary that can be grepped for
$ cat devstacklog.txt.gz | grep Fetched
2017-09-19 17:52:45.808 | Fetched 39.3 MB in 1s (26.3 MB/s)
2017-09-19 17:53:41.115 | Fetched 185 kB in 0s (3,222 kB/s)
2017-09-19 17:54:16.365 | Fetched 23.5 MB in 1s (21.1 MB/s)
2017-09-19 17:54:25.779 | Fetched 18.3 MB in 0s (35.6 MB/s)
2017-09-19 17:54:39.439 | Fetched 59.1 kB in 0s (0 B/s)
2017-09-19 17:54:40.986 | Fetched 2,128 kB in 0s (40.0 MB/s)
2017-09-19 17:57:37.190 | Fetched 333 kB in 0s (1,679 kB/s)
2017-09-19 17:58:17.592 | Fetched 50.5 MB in 2s (18.1 MB/s)
2017-09-19 17:58:26.947 | Fetched 5,829 kB in 0s (15.5 MB/s)
2017-09-19 17:58:49.571 | Fetched 5,065 kB in 1s (3,719 kB/s)
2017-09-19 17:59:25.438 | Fetched 9,758 kB in 0s (44.5 MB/s)
2017-09-19 18:00:14.373 | Fetched 77.5 kB in 0s (286 kB/s)
As mentioned, we setup the package manager to point to a region-local
mirror during node bringup. Depending on the i/o situation, it is
probably just as fast as coming off disk :) Note (also as mentioned)
these were never pre-installed, just pre-downloaded to an on-disk
cache area (as an aside, I don't think dnf was ever really happy with
that situation and kept being too smart and clearing it's caches).
If you're feeling regexy you could maybe do something similar with the
pip "Collecting" bits in the logs ... one idea for investigation down
that path is if we could save time by somehow collecting larger
batches of requirements and doing less pip invocations?
More information about the OpenStack-dev