libvirt: connect_volume scans all LUNs, which takes >2 mins when host is connected with about 900 Luns

Bug #1362513 reported by Shen Wang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Wishlist
Unassigned

Bug Description

Tested OpenStack version: IceHouse 2014.1, master branch still has this issue.
Host version: CentOS 6, 2.6.32-431.el6.x86_64

I have done some work to test the performance of LUN scanning with multipath, use the way like what Nova dose.
In my test, The host was connected with almost 900 LUNs.
1. I use 'iscsiadm' with '--rescan' to discover LUNs, which takes almost 15s. It seems '--rescan' cause kernel to rescan all the LUNs which has already been connected to the host.
2. I use 'multipath -r' to construct multipath devices, which takes almost 2 minutes. I found that 'multipath -r' will reconstructs all multipath devices against the LUNs
The two steps scans all of the LUNs, and totally costs more then 2 minutes.

According to "connect_volume" in nova.virt.libvirt.volume.py: https://github.com/openstack/nova/blob/master/nova/virt/libvirt/volume.py#L252, Nova also uses the tow steps to detect new multipath volume, this two steps will scan all of the LUNs, including all the others which already connected. So if a host has a large number of LUNs connected to it, the connect_volume will be very slow.

I think connect_volume needn't scan all of the LUNs, only need scan the LUN specified by connection_info.

Tags: libvirt
Revision history for this message
Shen Wang (peter.w) wrote :
Shen Wang (peter.w)
description: updated
Shen Wang (peter.w)
summary: - libvirt: connect_volume scans all LUNs, it will be very slow with a
- large number of volumes
+ libvirt: connect_volume scans all LUNs, which takes >2 mins when host
+ is connected with about 900 Luns
Shen Wang (peter.w)
description: updated
Shen Wang (peter.w)
tags: added: libvirt
Revision history for this message
Thang Pham (thang-pham) wrote :

This bug seems related to bug 1359617, which has a potential patch up for review: https://review.openstack.org/#/c/116998/

Revision history for this message
Shen Wang (peter.w) wrote :

Hi, Thang
I have read "bug 1359617" before I report this bug, the two bugs are not related to the same issue.

This bug is related to the LUN scanning, not twice calls of connect_volume

Revision history for this message
Sean Dague (sdague) wrote :

Honestly, I consider this a performance wishlist item. If there are patches that's cool, but this seems like a very edge case configuration.

Changed in nova:
status: New → Opinion
importance: Undecided → Wishlist
Shen Wang (peter.w)
Changed in nova:
assignee: nobody → Shen Wang (peter.w)
status: Opinion → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Sean Dague (<email address hidden>) on branch: master
Review: https://review.openstack.org/124978
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Removing "In Progress" status and assignee as change is abandoned.

Changed in nova:
status: In Progress → Confirmed
assignee: Shen Wang (peter.w) → nobody
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

This wishlist bug has been open a year without any activity. I'm going to move it to "Opinion / Wishlist", which is an easily-obtainable queue of older requests that have come on.

In case you want to work on that, consider writing a blueprints [1] and spec [2]. I'll recommend to read [3] if not yet done. The effort to implement the requested feature is then driven only by the blueprint (and spec).

References:
[1] https://blueprints.launchpad.net/nova/
[2] https://github.com/openstack/nova-specs
[3] https://wiki.openstack.org/wiki/Blueprints

Changed in nova:
status: Confirmed → Opinion
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.