[Gllug] swap over the network

Nix nix at esperi.org.uk
Wed Jan 23 20:01:04 UTC 2008


On 23 Jan 2008, Peter Childs uttered the following:

> On 23/01/2008, Adrian McMenamin <adrian at newgolddream.dyndns.info> wrote:
>>
>> I need to get access to swap over the network. My development target has
>> only 16MB of memory and no local writable storage (it uses nfs-root).
>>
>> Swap-over-NFS remains buggy - various patches to the kernel are floating
>> about but are not yet in mainline (or even in -mm afaics)
>>
>> But the discussion about the patches suggest that swap to network attached
>> storage works.
>>
>> Anyone here using it? Is it easy to do or does it require some patching of
>> the kernel?
>
> Swap over NBD works quite well or at least it does for under LTSP for
> me....  NBD is built into the Linux  Kernel

Yes, but it has the same problem as swap-over-NFS: that reception of
network packets requires memory allocation, and swapping happens when
there's memory pressure. So under sufficient memory pressure you *will*
deadlock without the emergency-memory-pool stuff in those (still-under-
review) patches.

Swapping to block devices that don't require allocations to write to
them works. Swapping to anything else is playing with fire.

-- 
`The rest is a tale of post and counter-post.' --- Ian Rawlings
                                                   describes USENET
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list