Bug 2166686 - enable multi-conn in nbdkit-curl-plugin
Summary: enable multi-conn in nbdkit-curl-plugin
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2023-02-27
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nbdkit
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: mxie@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-02 16:18 UTC by Richard W.M. Jones
Modified: 2023-05-09 09:06 UTC (History)
8 users (show)

Fixed In Version: nbdkit-1.32.5-4.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:47:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer issues 2358 0 None open HTTP import Ubuntu Server image to DataVolume is extremely slow 2023-02-02 16:19:30 UTC
Github kubevirt containerized-data-importer issues 2561 0 None open CDI download fails due to nbdkit: curl error 2023-02-02 16:19:44 UTC
Red Hat Issue Tracker RHELPLAN-147479 0 None None None 2023-02-02 16:20:15 UTC
Red Hat Product Errata RHBA-2023:2347 0 None None None 2023-05-09 07:48:11 UTC

Description Richard W.M. Jones 2023-02-02 16:18:26 UTC
Description of problem:

nbdkit-curl-plugin currently does not advertise NBD multi-conn.
NBD multi-conn (the ability to open multiple connections to
the server) is quite important for performance.  Upstream
we have enable multi-conn, although only for read-only curl
connections:

https://gitlab.com/nbdkit/nbdkit/-/commit/bb0f93ad7b9de451874d0c54188bf69cd37c5409

Version-Release number of selected component (if applicable):

nbdkit 1.32.5-3.el9

How reproducible:

100%

Steps to Reproduce:
1. See the commit message and
https://listman.redhat.com/archives/libguestfs/2023-February/030581.html
for suggestions.

Comment 1 Richard W.M. Jones 2023-02-02 17:26:34 UTC
One way to test this would be to create a large disk image, eg:

$ virt-builder --size 10G fedora-36

and then compare copying the disk image before and after updating
nbdkit using this command:

$ time nbdkit -r curl file:/var/tmp/fedora-36.img --run 'nbdcopy -p "$uri" null:'

It should be significantly faster (perhaps double) after the patch is applied.

This change should also make virt-v2v faster when using the
HTTPS method, but that is hard to measure.

Comment 2 mxie@redhat.com 2023-02-07 11:34:55 UTC
Reproduce the bug with nbdkit-1.32.5-3.el9.x86_64

Steps to reproduce:
1.Check if nbdkit curl filter is advertising multi-conn
#  nbdkit -r curl url='http://fileshare.englab.nay.redhat.com/pub/section3/libvirtmanual/mxie/esx8.0-rhel8.8-x86_64-sda'  sslverify=false  --run ' nbdinfo $uri ' | grep can_multi_conn
	can_multi_conn: false

2. Use nbdkit curl filter to download files from web server
#  time  nbdkit -r curl url='http://fileshare.englab.nay.redhat.com/pub/section3/libvirtmanual/mxie/esx8.0-rhel8.8-x86_64-sda'  sslverify=false  --run 'nbdcopy -p "$uri" null:'
█ 100% [****************************************]

real	10m8.516s
user	0m20.150s
sys	0m51.184s


Test the bug with nbdkit-1.32.5-4.el9.x86_64

Steps:
1.Check if nbdkit curl filter is advertising multi-conn
#  nbdkit -r curl url='http://fileshare.englab.nay.redhat.com/pub/section3/libvirtmanual/mxie/esx8.0-rhel8.8-x86_64-sda'  sslverify=false  --run ' nbdinfo $uri ' | grep can_multi_conn
	can_multi_conn: true

2. Use nbdkit curl filter to download files from web server
#  time  nbdkit -r curl url='http://fileshare.englab.nay.redhat.com/pub/section3/libvirtmanual/mxie/esx8.0-rhel8.8-x86_64-sda'  sslverify=false  --run 'nbdcopy -p "$uri" null:'
█ 100% [****************************************]

real	7m59.417s
user	0m23.561s
sys	0m59.721s


Result: multi-conn has been enabled in nbdkit-curl-plugin

Comment 6 mxie@redhat.com 2023-02-09 06:07:07 UTC
Move the bug to verified status according to comment2

Comment 8 errata-xmlrpc 2023-05-09 07:47:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nbdkit bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2347


Note You need to log in before you can comment on or make changes to this bug.