7.3 To Swap or Not to Swap
Swapping is an essential
component of most Linux workstation and server installatations. It
enables the system to address more memory than is physically
available by emulating the additional memory on a storage device.
Most embedded storage devices, such as flash and DOC devices,
however, are ill-adapted to this use, because they have limited erase
and write cycles. Since your application has little control over the
kernel's use of swapping, it is therefore possible
to accelerate the wear on the storage device used for swapping.
Hence, I encourage you to find alternatives to swapping. Try reducing
your applications' memory usage and having only the
minimal set of binaries required for your system's
proper behavior loaded at any time.
Of course, if your storage device is a real hard disk—not a CF
card—then swapping is a viable option. The use of swap may,
however, result in slower response times.
|