From: "Richard W.M. Jones" <rjones@redhat.com>
To: qemu-devel@nongnu.org
Cc: nbd@other.debian.org, libguestfs@redhat.com, virt-tools-list@redhat.com
Subject: [Qemu-devel] ANNOUNCE: libnbd 0.9.8 - prerelease of high performance NBD client library
Date: Thu, 15 Aug 2019 17:05:28 +0100 [thread overview]
Message-ID: <20190815160528.GA31491@redhat.com> (raw)
I'm pleased to announce a new high performance Network Block Device
(NBD) client library called libnbd. It's written in C and there are
also bindings available for Python, OCaml and (soon) Rust.
0.9.8 is the third pre-release before the stable 1.0 version where we
freeze the API, so feedback on API-related issues is very welcome now.
Download: http://download.libguestfs.org/libnbd/
Documentation: https://github.com/libguestfs/libnbd/blob/master/docs/libnbd.pod
Fedora package: https://koji.fedoraproject.org/koji/packageinfo?packageID=28807
Debian package: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=933223
Git repo: https://github.com/libguestfs/libnbd
Mailing list: libguestfs@redhat.com (no subscription required)
Here are some of the things you can do with this library ...
Connect to an NBD server and grab the first sector of the disk:
https://github.com/libguestfs/libnbd/blob/a5f8fd2f0f48e9cf2487e23750b55f67b166014f/examples/simple-fetch-first-sector.c#L14
High performance multi-threaded reads and writes, with multiple
connections and multiple commands in flight on each connection:
https://github.com/libguestfs/libnbd/blob/master/examples/threaded-reads-and-writes.c
Integrate with glib main loop:
https://github.com/libguestfs/libnbd/blob/master/examples/glib-main-loop.c
Connect to an NBD server from an interactive shell:
$ nbdkit -f linuxdisk . &
$ nbdsh --connect nbd://localhost
Welcome to nbdsh, the shell for interacting with
Network Block Device (NBD) servers.
nbd> h.get_size()
716266496
nbd> buf = h.pread (512, 0)
nbd> print ("%r" % buf)
[prints the first sector]
Use ‘fio’ to benchmark an NBD server:
$ nbdkit -U - memory size=256M \
--run 'export unixsocket ; fio examples/nbd.fio '
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
reply other threads:[~2019-08-15 16:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190815160528.GA31491@redhat.com \
--to=rjones@redhat.com \
--cc=libguestfs@redhat.com \
--cc=nbd@other.debian.org \
--cc=qemu-devel@nongnu.org \
--cc=virt-tools-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.