From the course: Linux: Storage Systems

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Configure and manage swap space

Configure and manage swap space - Linux Tutorial

From the course: Linux: Storage Systems

Start my 1-month free trial

Configure and manage swap space

- [Instructor] Let's talk about swapping. Swapping in Linux is the kernel being desperate. That is, it is deciding it doesn't have enough memory for things to be able to run reasonably, so it's going to throw some stuff out of memory, copying things out the disk. Typically, if your system is swapping, that's bad news. It's going to be really pretty slow. It's best if you add more memory or run fewer things, if you can. But having your system configured to swap means that things may run instead of just being killed. Now, I want to point out that swapping is not the same as paging. Linux is a demand-page system. When you run a program, for example, it doesn't read the whole program into memory, it reads it in as you jump around to different parts of it. When you read a data file, it just reads part of it in to start with, and then as you reference different parts, those are brought in. That's demanding that those pages be brought in. Swapping is different. Swapping is the kernel saving…

Contents