Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2166686

Summary: enable multi-conn in nbdkit-curl-plugin
Product: Red Hat Enterprise Linux 9 Reporter: Richard W.M. Jones <rjones>
Component: nbdkitAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: mxie <mxie>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.2CC: eblake, lersek, mxie, rjones, tzheng, virt-maint, xiaodwan, yoguo
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nbdkit-1.32.5-4.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:47:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Deadline: 2023-02-27   

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