[Libguestfs] ZFS-on-NBD - follow-up

2022-09-29 Thread Nikolaus Rath
Hi, Following up on my last post on this topic (since there seemed to be at least some interest): after evaluating the setup for a few weeks, I have decided that this is not as good a solution as I had hoped. In particular, the expected benefits of splitting data between a special vdev backed

Re: [Libguestfs] ZFS-on-NBD

2022-09-16 Thread Nikolaus Rath
On Sep 14 2022, Shaun McDowell wrote: > It has been a few years since I've worked on it but there were a number of > gotchyas we had to overcome when running block devices in userspace and > mounted on the same system. The largest of which is that the userland > process needs to be extremely caref

[Libguestfs] ZFS-on-NBD

2022-09-12 Thread Nikolaus Rath
Hi all, In case people have been wondering about the background of the various questions that I asked on these lists in the last few months: I've been experimenting with running ZFS-on-NBD as a cloud backup solution (and potential alternative to S3QL, which I am using for this purpose at the m

Re: [Libguestfs] Kernel driver I/O block size hinting

2022-06-15 Thread Nikolaus Rath
On Jun 15 2022, "Richard W.M. Jones" wrote: >> > I think we could set this to MIN (32M, NBD maximum block size constraint), >> > converting the result to sectors. >> >> I don't think that's right. Rather, it should be NBD's preferred block >> size. >> >> Setting this to the preferred block size m

Re: [Libguestfs] Kernel driver I/O block size hinting

2022-06-15 Thread Nikolaus Rath
On Jun 15 2022, "Richard W.M. Jones" wrote: > On Wed, Jun 15, 2022 at 11:09:31AM +0100, Richard W.M. Jones wrote: >> This kernel setting limits the maximum request size on the queue. >> >> In my testing reading and writing files with the default [above] the >> kernel never got anywhere near sendi

Re: [Libguestfs] Kernel driver I/O block size hinting

2022-06-14 Thread Nikolaus Rath
On Jun 14 2022, "Richard W.M. Jones" wrote: > This is a follow-up to this thread: > > https://listman.redhat.com/archives/libguestfs/2022-June/thread.html#29210 > > about getting the kernel client (nbd.ko) to obey block size > constraints sent by the NBD server: > > > https://github.com/Netwo

Re: [Libguestfs] How to speed up Kernel Client - S3 plugin use-case

2022-06-13 Thread Nikolaus Rath
On Jun 13 2022, "Richard W.M. Jones" wrote: > On Mon, Jun 13, 2022 at 11:58:11AM +0100, Nikolaus Rath wrote: >> On Jun 13 2022, "Richard W.M. Jones" wrote: >> > On Mon, Jun 13, 2022 at 10:33:58AM +0100, Nikolaus Rath wrote: >> >> Hello, >

Re: [Libguestfs] How to speed up Kernel Client - S3 plugin use-case

2022-06-13 Thread Nikolaus Rath
On Jun 13 2022, "Richard W.M. Jones" wrote: > On Mon, Jun 13, 2022 at 10:33:58AM +0100, Nikolaus Rath wrote: >> Hello, >> >> I am trying to improve performance of the scenario where the kernel's >> NBD client talks to NBDKit's S3 plugin. >> &

[Libguestfs] How to speed up Kernel Client - S3 plugin use-case

2022-06-13 Thread Nikolaus Rath
Hello, I am trying to improve performance of the scenario where the kernel's NBD client talks to NBDKit's S3 plugin. For me, the main bottleneck is currently due to the fact that the kernel aligns requests to only 512 B, no matter the blocksize reported by nbdkit. Using a 512 B object size is no

Re: [Libguestfs] [nbdkit PATCH] RFC: blocksize: Add test for sharding behavior

2022-05-26 Thread Nikolaus Rath
On May 26 2022, "Richard W.M. Jones" wrote: > Is there any way to do this without the literal sleeps? Gitlab CI in > particular appears to be very contended (I guess it runs in parallel > on huge systems with vast numbers of unrelated containers). I've seen > threads being created that are so st

Re: [Libguestfs] nbdkit blocksize filter, read-modify-write, and concurrency

2022-05-25 Thread Nikolaus Rath
On May 25 2022, Eric Blake wrote: > On Tue, May 24, 2022 at 08:45:02PM +0100, Nikolaus Rath wrote: >> > However, you are worried that a third possibility occurs: >> > >> > T2 sees that it needs to do RMW, grabs the lock, and reads 0x00-0x0f >> > for the

Re: [Libguestfs] nbdkit blocksize filter, read-modify-write, and concurrency

2022-05-24 Thread Nikolaus Rath
On May 24 2022, Eric Blake wrote: > minblock = 0x10 > Thread 1: receives write request for offset 0x00, size 0x10 (aligned request) > Thread 2: receives write request for offset 0x04, size 0x16 (unaligned > offset, unaligned size) > > Graphically, we are wanting to write the following, given init

Re: [Libguestfs] nbdkit blocksize filter, read-modify-write, and concurrency

2022-05-21 Thread Nikolaus Rath
On May 21 2022, "Richard W.M. Jones" wrote: > On Sat, May 21, 2022 at 01:21:11PM +0100, Nikolaus Rath wrote: >> Hi, >> >> How does the blocksize filter take into account writes that end-up >> overlapping due to read-modify-write cycles? >> >> Sp

[Libguestfs] nbdkit blocksize filter, read-modify-write, and concurrency

2022-05-21 Thread Nikolaus Rath
Hi, How does the blocksize filter take into account writes that end-up overlapping due to read-modify-write cycles? Specifically, suppose there are two non-overlapping writes handled by two different threads, that, due to blocksize requirements, overlap when expanded. I think there is a risk t

Re: [Libguestfs] [PATCH nbdkit] s3: Only run the tests if boto3 is installed

2022-05-17 Thread Nikolaus Rath
On May 17 2022, Laszlo Ersek wrote: > I think so, yes: from your description, "test-S3-unit.sh" seems "less > demanding" than "test-S3.sh", so if the mocked module satisfies the > latter, it should be good enough for the former too. Not quite. test-S3-unit.sh exercises the write path and the mult

Re: [Libguestfs] S3 plugin test case breaks test suite / development workflow...

2022-05-17 Thread Nikolaus Rath
On May 17 2022, Laszlo Ersek wrote: > Hi, > > I'm writing this about a specific problem and about a general problem. > > * The specific problem is that commit 5130c43bc1f9 ("S3 plugin: add > support for accessing multiple objects", 2022-05-12) introduced a > dependency on the "botocore" python mod

Re: [Libguestfs] Communication issues between NBD driver and NBDKit server

2022-05-17 Thread Nikolaus Rath
On May 16 2022, "yukuai (C)" wrote: > On 2022/05/16 3:25, Richard W.M. Jones wrote: >> On Sun, May 15, 2022 at 08:12:59PM +0100, Nikolaus Rath wrote: >>> Do you see any way for this to happen? >> I think it's impossible. A more likely explanation follows.

Re: [Libguestfs] Communication issues between NBD driver and NBDKit server

2022-05-15 Thread Nikolaus Rath
On May 15 2022, "Richard W.M. Jones" wrote: > On Sun, May 15, 2022 at 04:45:11PM +0100, Nikolaus Rath wrote: >> Hi, >> >> I am observing some strange errors when using the Kernel's NBD driver with >> NBDkit. >> >> On the kernel side, I se

Re: [Libguestfs] Communication issues between NBD driver and NBDKit server

2022-05-15 Thread Nikolaus Rath
On May 15 2022, Josef Bacik wrote: > On Sun, May 15, 2022 at 11:45 AM Nikolaus Rath wrote: >> >> Hi, >> >> I am observing some strange errors when using the Kernel's NBD driver with >> NBDkit. >> >> On the kernel side, I see: >> >> M

[Libguestfs] Communication issues between NBD driver and NBDKit server

2022-05-15 Thread Nikolaus Rath
Hi, I am observing some strange errors when using the Kernel's NBD driver with NBDkit. On the kernel side, I see: May 15 16:16:11 vostro.rath.org kernel: nbd0: detected capacity change from 0 to 104857600 May 15 16:16:11 vostro.rath.org kernel: nbd1: detected capacity change from 0 to 1048576

Re: [Libguestfs] nbdkit error: "write reply: NBD_CMD_WRITE: Broken pipe"

2022-05-06 Thread Nikolaus Rath
On May 03 2022, rjones at redhat.com (Richard W.M. Jones) wrote: >> So I tried to reproduce this, and noticed something odd. It seems I can >> disconnect the nbd device (nbd-client -d) while there are still requests >> in flight: >> >> May 02 15:20:50 vostro.rath.org kernel: nbd1: detected capacit

Re: [Libguestfs] nbdkit worker thread shutdown

2022-05-05 Thread Nikolaus Rath
On May 05 2022, "Richard W.M. Jones" wrote: > On Thu, May 05, 2022 at 08:59:56AM +0100, Nikolaus Rath wrote: >> Hello, >> >> When nbdkit calls a plugin's unload() method, is it guaranteed that all >> pending requests have been handled (and all wo

Re: [Libguestfs] nbdkit worker thread shutdown

2022-05-05 Thread Nikolaus Rath
On Thu, 5 May 2022, at 12:04, Laszlo Ersek wrote: > On 05/05/22 09:59, Nikolaus Rath wrote: >> Hello, >> >> When nbdkit calls a plugin's unload() method, is it guaranteed that all >> pending requests have been handled (and all worker threads exited)? >> &g

[Libguestfs] nbdkit worker thread shutdown

2022-05-05 Thread Nikolaus Rath
Hello, When nbdkit calls a plugin's unload() method, is it guaranteed that all pending requests have been handled (and all worker threads exited)? (I would have expected this to be the case, but I'm getting errors from threads accessing data that my unload() handler frees, so I wanted to confirm

Re: [Libguestfs] nbdkit: how to require use of filter

2022-05-04 Thread Nikolaus Rath
On May 03 2022, rjones at redhat.com (Richard W.M. Jones) wrote: > On Mon, May 02, 2022 at 10:25:44AM +0100, Nikolaus Rath wrote: >> Hi, >> >> Is there a way for a nbdkit plugin to *require* use of a nbdkit filter >> (specifically the nbdkit-blocksize-filter) progra

Re: [Libguestfs] nbdkit: how to require use of filter

2022-05-04 Thread Nikolaus Rath
On May 02 2022, eblake at redhat.com (Eric Blake) wrote: > On Mon, May 02, 2022 at 10:25:44AM +0100, Nikolaus Rath wrote: >> Hi, >> >> Is there a way for a nbdkit plugin to *require* use of a nbdkit filter >> (specifically the nbdkit-blocksize-filter) programmatically

Re: [Libguestfs] nbdkit error: "write reply: NBD_CMD_WRITE: Broken pipe"

2022-05-02 Thread Nikolaus Rath
On May 02 2022, Laszlo Ersek wrote: > On 05/01/22 18:35, Nikolaus Rath wrote: >> Hi, >> >> I am developing a new nbdkit plugin, and occasionally I am getting >> errors like this: >> >> |nbdkit: s3backer.8: error: write reply: NBD_CMD_WRITE: Broken pipe >

[Libguestfs] nbdkit: how to require use of filter

2022-05-02 Thread Nikolaus Rath
Hi, Is there a way for a nbdkit plugin to *require* use of a nbdkit filter (specifically the nbdkit-blocksize-filter) programmatically? Thanks! -Nikolaus -- GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F »Time flies like an arrow, fruit flies like a Banana.« __

Re: [Libguestfs] nbdkit error: "write reply: NBD_CMD_WRITE: Broken pipe"

2022-05-02 Thread Nikolaus Rath
On May 02 2022, Laszlo Ersek wrote: > On 05/01/22 18:35, Nikolaus Rath wrote: >> Hi, >> >> I am developing a new nbdkit plugin, and occasionally I am getting >> errors like this: >> >> |nbdkit: s3backer.8: error: write reply: NBD_CMD_WRITE: Broken pipe >

[Libguestfs] nbdkit error: "write reply: NBD_CMD_WRITE: Broken pipe"

2022-05-01 Thread Nikolaus Rath
Hi, I am developing a new nbdkit plugin, and occasionally I am getting errors like this: `nbdkit: s3backer.8: error: write reply: NBD_CMD_WRITE: Broken pipe nbdkit: s3backer.15: error: write reply: NBD_CMD_WRITE: Broken pipe` (where "s3backer" is the plugin name). I am not sure what to make of

[Libguestfs] nbdkit: determining block size distribution

2022-04-25 Thread Nikolaus Rath
Hello, I want to find out the request size distribution of NBD read, write, and trim requests for a given workload. Background is that I want to figure out the ideal block size for the backing storage used my an nbdkit plugin. It seems to me that the best way to get this information would be to