[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: nbd, nbdkit, loopback mounts and memory management
On Fri, Feb 15, 2019 at 10:41:26PM +0000, Richard W.M. Jones wrote:
> On Fri, Feb 15, 2019 at 08:19:54PM +0100, Pavel Machek wrote:
> > Hi!
> >
> > I watched fosdem talk about
> > nbdkit... . Nice. But word
> > of warning: I'm not sure using it read-write on localhost is safe.
> >
> > In particular, user application could create a lot of dirty data
> > quickly. If there's not enough memory for nbdkit (or nbd-client or
> > nbd-server), you might get a deadlock.
> Thanks for the kind words about the talk. I've added Wouter Verhelst
> & the NBD mailing list to CC. Although I did the talk because the
> subject is interesting, how I actually use nbdkit / NBD is to talk to
> qemu and that's where I have most experience and where we (Red Hat)
> use it in production systems.
> However in January I spent a lot of time exercising the NBD loop-mount
> + nbdkit case using fio in order to find contention / bottlenecks in
> our use of threads and locks. I didn't notice any particular problems
> then, but it's possible my testing wasn't thorough enough. Or that
> fio only creates small numbers of dirty pages (because of locality in
> its access patterns I guess?)
> When you say it's not safe, what could happen? What would we observe
> if it was going wrong?

Reading more carefully I see you said we'd observe a deadlock. I
didn't see that, but again my testing of this wouldn't have been very
thorough. When I have some time I'll try creating / spooling huge
files into an NBD loop mount to see if I can cause a deadlock.

Thanks, Rich.

> > Also note that nbd.txt in Documentation/blockdev/ points to
> > sourceforge; it should probably point to
> > ?
> Wouter should be able to say what the correct link should be.
> Rich.
> --
> Richard Jones, Virtualization Group, Red Hat
> Read my programming and virtualization blog:
> libguestfs lets you edit virtual machines. Supports shell scripting,
> bindings from many languages.

Richard Jones, Virtualization Group, Red Hat
Read my programming and virtualization blog:
virt-builder quickly builds VMs from scratch

 \ /
  Last update: 2019-02-15 23:53    [W:0.075 / U:1.696 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site