[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] what about...



On Fri, Sep 23, 2011 at 02:47:00PM +0200, Folkert van Heusden wrote:
> What about compression of the data?
> I noticed that nbd-server is capable of doing 3GB/s through localhost
> so clearly there's a bottleneck when using 1Gb networks.

I don't think that kind of stuff belongs in the NBD layer. This adds
complexity, while you can easily implement similar functionality with
something along the lines of squashfs. By doing it that way, you also
don't put extra stress on the server like you would if the NBD protocol
were to implement compression, which creates scalability issues. If you
use squashfs, the data that actually goes over the wire will be
compressed too, so you would see the same speedups; and after all, the
data really is opaque for the server anyway, so whether it's ext4 data,
or swap data, or a squashfs, the server couldn't care less.

For similar reasons, I don't believe in adding an encryption option to
the protocol, either -- though the reasoning there is slightly
different (there are some use cases that could be valid for encryption,
like a replay attack, that you can't "fix" with dm-crypt or similar; but
there are other ways of implementing that without having to change the
NBD protocol).

Having said all that, while I'm not going to implement it myself, if
someone were to come up with a working patch that'd be easy to support
going forward, I wouldn't oppose it...

-- 
The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a



Reply to: