download images only once per conductor in pxe driver

Bug #1199665 reported by Ghe Rivero
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Dmitry Tantsur

Bug Description

Revise the logic when requestiong to download multiple images (similars or not), so different tasks don't download the same image twice.

ironic/drivers/modules/pxe.py -> _download_in_progress & _get_image

aeva black (tenbrae)
Changed in ironic:
status: New → Triaged
importance: Undecided → Medium
Max Lobur (max-lobur)
Changed in ironic:
assignee: nobody → Max Lobur (max-lobur)
Max Lobur (max-lobur)
Changed in ironic:
status: Triaged → In Progress
Revision history for this message
Robert Collins (lifeless) wrote :

This bug covers two different things:
 - don't download the same image twice [to the same conductor]
 - download images in parallel.

The former is an efficiency gain, the latter is actually often going to be a pessimisation. Why? because unless there are multiple workers at both ends, parallelisation just means 'context switch more often' - e.g. if we don't read() at wire speed, tcp won't fully open and we'll see slower downloads of each image (particularly visible on faster networks where we can't easily keep up).

So, I'd like to make this bug be 'download any given image once only', and we can use profiling to see whether image download performance is an issue. If it is, we'll need this to be a configurable setting, because a machine with only one hard disk will almost always be better off downloading one thing at a time (less seeks == more throughput) particularly if images exceed the working set on the machine. Long term for performance we should be downloading only the kernel and ramdisk anyway, and using some more efficient (bittorrent/multicast/bitfountain) method for image deployment straight out of glance.

summary: - Allow multiple image downloads in pxe logic
+ download images only once per conductor in pxe driver
description: updated
Revision history for this message
Max Lobur (max-lobur) wrote :
aeva black (tenbrae)
Changed in ironic:
assignee: Max Lobur (max-lobur) → nobody
status: In Progress → Triaged
Dmitry Tantsur (divius)
Changed in ironic:
assignee: nobody → Dmitry "Divius" Tantsur (divius)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/85387

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/85387
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=fb771158d0c7b3876e09808b9897f9d64a9fdcf4
Submitter: Jenkins
Branch: master

commit fb771158d0c7b3876e09808b9897f9d64a9fdcf4
Author: Dmitry Tantsur <email address hidden>
Date: Sat Mar 29 16:18:18 2014 +0100

    Implement more robust caching for master images

    This patch introduces caching for master images, which
    are no longer used. This patch also introduces clean up procedure,
    which is triggered every time cache size increases or link
    to master images is deleted. Algorithm is following:
    - Images are eligible for deletion, if their link count equals 1.
      Images that has link count >1 are not considered for deletion,
      because it anyway won't reclaim any disk space.
    - All images older than configurable TTL are deleted
    - Then the oldest images are deleted, until size of cache fits
      into configurable value or no more images eligable for deletion.

    As this change required rethinking how we cache images, I also
    did a refactor and grouped related functions under ImageCache class.

    Change-Id: I1c849fe209c4dbb15e075dbb34c4ea33010a8883
    Closes-Bug: #1199665

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.