Managing swap

As I mentioned earlier in this book, the concept of swap is one that has been a subject of great debate, with some administrators even omitting it outright. When your server is running smoothly, you should never need swap. If your server does start consuming a lot of swap, it's definitely cause for concern. Swap space is a special partition (or file) that is used for memory when your physical memory gets depleted. It's not uncommon for a handful of megabytes here and there to be consumed by swap, but when serious swap space is used, it's usually the sign of a struggling server.

Theoretically, this space should remain idle and (for the most part) unused. In a perfect world, your server will always run efficiently, processes will never ...

Get Mastering Ubuntu Server now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.