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 2011709 - Rebase to nbdkit 1.28 before RHEL 9 GA
Summary: Rebase to nbdkit 1.28 before RHEL 9 GA
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nbdkit
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: mxie@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1999559 2018463 2029751
TreeView+ depends on / blocked
 
Reported: 2021-10-07 07:35 UTC by Richard W.M. Jones
Modified: 2022-05-17 13:12 UTC (History)
11 users (show)

Fixed In Version: nbdkit-1.28.5-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 12:50:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-99113 0 None None None 2021-10-07 07:37:12 UTC
Red Hat Product Errata RHEA-2022:2408 0 None None None 2022-05-17 12:51:08 UTC

Description Richard W.M. Jones 2021-10-07 07:35:12 UTC
Description of problem:

Since RHEL 9 Beta was released, nbdkit has released a new
stable branch (1.28).  Because of the number of backports
in RHEL 9 Beta, updating to the new stable branch for GA
is not actually a very large change.

Here are the release notes for the new stable branch:
https://libguestfs.org/nbdkit-release-notes-1.28.1.html

This update is optional, we don't need to do it if it would
cause too much extra work for QE.

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

nbdkit-1.26.5-1.el9 -> 1.28.x

Comment 1 Richard W.M. Jones 2021-10-29 13:50:36 UTC
New version is nbdkit-1.28.1-1.el9

Note this is a rebase along the upstream stable branch and so contains
only bug fixes (except for the new feature added in bug 2018463).

Comment 2 Richard W.M. Jones 2021-10-29 14:57:46 UTC
Setting Verified Tested to move the process along.  There is a build
which passed the internal tests:
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1776921

Comment 5 Richard W.M. Jones 2021-12-07 10:10:46 UTC
nbdkit-1.28.3-1.el9

This is a simple rebase along the stable branch, containing only bug fixes:
https://gitlab.com/nbdkit/nbdkit/-/commits/stable-1.28/

Comment 6 Richard W.M. Jones 2022-01-04 14:20:50 UTC
nbdkit-1.28.4-1.el9

This is another simple rebase along the stable branch, bringing
only bug fixes:
https://gitlab.com/nbdkit/nbdkit/-/commits/stable-1.28/

Comment 7 Richard W.M. Jones 2022-01-24 12:55:31 UTC
As before this is an update along the stable branch bringing in
a few more upstream fixes before RHEL 9.0.

Comment 8 mxie@redhat.com 2022-01-27 02:32:28 UTC
Verify the bug with nbdkit-1.28.5-1.el9.x86_64

Steps:
1.Rebuild nbdkit rpm packages from src package

$ rpmbuild --rebuild nbdkit-1.28.5-1.el9.src.rpm 
....
libtool: warning: remember to run 'libtool --finish /usr/lib64/nbdkit/filters'
....
+ exit 0

2.Check if '-D cow.verbose=1' can restore the old debug output

2.1 # nbdkit -fv --filter=cow memory 10k --run 'nbdsh -u $uri -c "h.pwrite(bytearray(1024), 0)"' |& grep 'debug: cow: blk'

2.2 # nbdkit -fv --filter=cow memory 10k --run 'nbdsh -u $uri -c "h.pwrite(bytearray(1024), 0)"' -D cow.verbose=1 |& grep 'debug: cow: blk'
nbdkit: memory.0: debug: cow: blk_read_multiple block 0 (offset 0) run of length 1 is not allocated
nbdkit: memory.0: debug: cow: blk_write block 0 (offset 0)

3.Check default block size for nbdkit-cache-filter and nbdkit-cow-filter 

# man nbdkit-cache-filter |grep 64K -B 3
       cache-min-block-size=SIZE
           Set the minimum block size used by the cache.  This must be a power of 2 and ≥ 4096.

           The default is 64K, or the block size of the filesystem which contains the temporary file storing the cache (whichever


# man nbdkit-cow-filter |grep 64K -B 4
       cow-block-size=N
           Set the block size used by the filter.  This has to be a power of two and the minimum block size is 4K.  The maximum
           block size depends on the plugin, but a block size larger than a few megabytes is not usually a good idea.

          The default is 64K.

4.Convert a guest with vddk.stats=1 by nbdkit
# # nbdkit --exit-with-parent --threads 16 -D nbdkit.backend.datapath=0 -D vddk.stats=1 -D vddk.datapath=0 --verbose --filter multi-conn --filter cow --filter cacheextents --filter retry vddk server=10.73.198.169 vm=moref=vm-6306 file='[esx7.0-matrix] esx7.0-rhel8.5-x86_64_1/esx7.0-rhel8.5-x86_64.vmdk' user=root libdir=/home/vddk7.0.2 thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 multi-conn-mode=disable cow-block-size=4096 cow-on-read=/tmp/v2v.6l3Qwq/convert password=+/home/passwd --run 'qemu-img convert $nbd /home/esx7.0-rhel8.5-x86_64'
.....
nbdkit: debug: VDDK function stats (-D vddk.stats=1):
nbdkit: debug: VixDiskLib_...                        µs calls           bytes
nbdkit: debug:   Exit                           1002565     1
nbdkit: debug:   ConnectEx                       707986     1
nbdkit: debug:   ReadAsync                       385188 22530     17209233408
nbdkit: debug:   Open                            286491     1
nbdkit: debug:   InitEx                          129163     1
nbdkit: debug:   QueryAllocatedBlocks             35957    19
nbdkit: debug:   Disconnect                        4481     1
nbdkit: debug:   GetInfo                           3411     1
nbdkit: debug:   Close                             2472     1
nbdkit: debug:   FreeBlockList                      324    19
nbdkit: debug:   Wait                                37     1
nbdkit: debug:   FreeInfo                            28     1
nbdkit: debug:   FreeConnectParams                   23     1
nbdkit: debug:   GetTransportMode                    18     1
nbdkit: debug:   AllocateConnectParams                9     1
nbdkit: debug: retry: unload filter
nbdkit: debug: cacheextents: unload filter
nbdkit: debug: cow: unload filter
nbdkit: debug: multi-conn: unload filter



Hi Richard,

    nbdkit 1.28 release note said 'nbdkit-cow-filter...In addition the default block size for both filters is now 64K. Both changes greatly improve performance', my understanding is 64k should be the best size for performance for cow filter,but I found v2v use 'cow-block-size=4096' in conversion, is it expected?

   # cat virt-v2v-1.45.97-2.log |grep 'cow-block-size=4096'
Jan 26 11:16:41  LANG=C 'nbdkit' '--exit-with-parent' '--foreground' '--pidfile' '/tmp/v2vnbdkit.P1jGNB/nbdkit1.pid' '--unix' '/tmp/v2v.UgyuQD/in0' '--threads' '16' '--selinux-label' 'system_u:object_r:svirt_socket_t:s0' '-D' 'nbdkit.backend.datapath=0' '-D' 'vddk.stats=1' '-D' 'vddk.datapath=0' '--verbose' '--filter' 'multi-conn' '--filter' 'cow' '--filter' 'cacheextents' '--filter' 'retry' 'vddk' 'server=10.73.198.169' 'vm=moref=vm-6306' 'file=[esx7.0-matrix] esx7.0-rhel8.5-x86_64_1/esx7.0-rhel8.5-x86_64.vmdk' 'user=vsphere.local\Administrator' 'libdir=/home/vddk7.0.2' 'thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78' 'multi-conn-mode=disable' 'cow-block-size=4096' 'cow-on-read=/tmp/v2v.UgyuQD/convert' 'password=+/home/passwd'

Comment 9 Richard W.M. Jones 2022-01-27 08:56:44 UTC
>     nbdkit 1.28 release note said 'nbdkit-cow-filter...In addition the default block size for both filters is now 64K. Both changes greatly improve performance', my understanding is 64k should be the best size for performance for cow filter,but I found v2v use 'cow-block-size=4096' in conversion, is it expected?

The release notes for 1.28 were wrong.  The optimal block size for nbdkit-cow-filter
depends on how the filter is used, but for our use case in virt-v2v using a smaller
block size gave better performance by avoiding read-modify-write cycles in the
fstrim step:

https://github.com/libguestfs/virt-v2v/commit/351d61f768c51287917a04b9fbedf24d79f5deb4

Comment 10 mxie@redhat.com 2022-01-27 10:15:31 UTC
Thanks rjones, move the bug from ON_QA to VERIFIED according to comment8 and comment9

Comment 12 errata-xmlrpc 2022-05-17 12:50:41 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 (new packages: nbdkit), 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/RHEA-2022:2408


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