From the course: Exploring Linux Internals: Advanced Insights and Practical Applications

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Configuring and monitoring swap space

Configuring and monitoring swap space

- In this video, I'm going to tell you about configuration and monitoring of swap space. Now first there is the essential question, how much swap do you need? And the answer is simple. There is no uniform answer to this question, but there are some guidelines: On systems with less than one gigabyte of RAM, the recommendation is to allocate twice the amount of RAM as swap. On systems with more than four gigabytes, having 25% of RAM available in swap is often enough. Some applications have their own recommendation and some applications don't work well if swap is enabled. Kubernetes clusters for instance, if you want to install a Kubernetes cluster node using kubeadm, you can't have any swap. And also you should consider the amount of inactive anonymous memory. All of your inactive anonymous memory should fit in swap. Now if you are using swap, you should monitor it because having swap is good but it can cause problems. So for a generic overview, you can use the free and top utilities…

Contents