Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1695904 - nbdkit parallel support is thread-heavy
Summary: nbdkit parallel support is thread-heavy
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nbdkit
Version: ---
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2019-04-03 21:26 UTC by Eric Blake
Modified: 2019-04-03 21:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

Description Eric Blake 2019-04-03 21:26:28 UTC
Description of problem:
When I first implemented multi-threaded support in nbdkit, I used a command-line configurable --threads parameter to control how many requests can be in flight in parallel, defaulting to 16. But that implementation spins up all worker threads up front, prior to servicing any client requests, making it rather heavyweight especially when the client uses the connection only serially. Better would be an on-demand thread pool, that only creates secondary worker threads when the client is actually issuing parallel requests.

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

How reproducible:
Use of 'nbdkit -fv file /path/to/something' followed by an nbd client (perhaps 'qemu-io -r -f raw nbd://localhost') shows the worker threads being spun up and down per connection, rather than reusing a threadpool.

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

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