* [Qemu-devel] ANNOUNCE: libnbd 0.9.8 - prerelease of high performance NBD client library
@ 2019-08-15 16:05 Richard W.M. Jones
0 siblings, 0 replies; only message in thread
From: Richard W.M. Jones @ 2019-08-15 16:05 UTC (permalink / raw)
To: qemu-devel; +Cc: nbd, libguestfs, virt-tools-list
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-08-15 16:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-15 16:05 [Qemu-devel] ANNOUNCE: libnbd 0.9.8 - prerelease of high performance NBD client library Richard W.M. Jones
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.