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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.