[ENBD] Anyone got swapping over NBD-2.4.25 working?

Alan Messer enbd@lists.community.tummy.com
Fri, 04 Jan 2002 14:55:24 -0800


Peter T. Breuer wrote:

> Now, you can run enbd over ANY medium. All that needs to be changed
> is the single module "stream.c", which provides the methods init,
> open, read, write that I expect to need on a streaming medium. If
> somebody would like to provide a udp option (it allows for tcp and ssl
> over tcp at present), I would be grateful. It should even be simple.
> 
> I suspect that udp would not cause any memory deadlocks.


Certainly UDP would improve the performance. Does ENBD provide its 
own recovery mechanisms? Since I'd hate to lose a page.. :)

>>Interesting. If I understand correctly, the kernel is quite happy, 
>>but the swap action gets stuck. Therefore, other swaps and 
>>processes can continue to run? I'll try a few more processes to 

> 
> Not necessarily. If you have experience of nfs, for example, you will
> know that all sorts of interactions take place and other processes begin
> to stick in io too, for varieties of reasons.  You might get sendmail
> stuck trying to read a possible .forward off the downed mount, for
> example, even though sendmail is running on a different partition.


Indeed, that what I thought. Although may be it buys to a little 
more time until it dies.

I added the 'mlockall' to the nbd-client as you suggested and in 
my initial tests it worked like a charm! Ran it under very heavy 
load for about 2-3 hours and apart from running very slooowwwwily, 
it didn't crash at all. However, you need to be careful to remove 
the NBD swap partition before you do a reboot, since it'll kill 
the nbd-client and leave your swapper with no where to swap. (Not 
good!).

I'll let you know if I have any other problems, but I suggest 
others give it a try too. If it works fine, I'd definitely suggest 
that you should be tempted to put it in the main code with a 
'--swap' option.

Cheers,

Alan.