Skip to main content

Nswap as an Adaptable and Fast Replacement Swap System

doug

Nswap as an Adaptable and Fast Replacement Swap System

Doug Woos and Tia Newhall

NSWAP is an extension to the Linux operating system that implements network swapping. Normally, if the operating system runs out of space in memory, it swaps some data out to disk to free up space. Using Nswap, the data are instead sent over the network and stored in the memory of other machines which have more free space available.

There are several issues with Nswap's current implementation. One is that when the system runs out of space on the network, it must fall back to local disk for swapping; Nswap is currently very slow when doing these writes.. Another is that Nswap's size may need to change at runtime, but there is no good way to inform the operating system of the change in size. Finally, there is currently no way to integrate flash memory into Nswap.

The solution to all of these problems is the same: rewriting Nswap as a two-layer system. A given page of memory can be either sent out over the network or written to hard disk or flash. This solves all three of the above problems: since Nswap no longer goes through the file system, writebacks are faster; Nswap now always reports its size as that of the underlying disk, and swaps network pages back to disk if it needs to shrink its network storage; and flash integration can move data between Network RAM, disk, and flash devices to optimize data and to adapt to changes to capacity and availability of network nodes.