Memory management in Ubuntu and Linux
in general is fairly optimal. Any applications that cause memory problems (eg “memory leaks”) would be considered buggy. Unused RAM is utilised by the system for read-ahead cache and other optimisations. These optimisations are removed from memory if it required by the system, so there’s no need to clean it either manually or by some kind of watchdog daemon.
If you run out of normal memory, then the system will start to use the swap partition, so it’s important to at least have one set up. This will cause performance to degrade but will prevent the system from crashing if you do run out of normal memory.
If you are consistently using a large amount of swap in normal operations it would be a good indication that your system is under spec’d for the kinds of things that you are trying to do. If you hardly every use any swap, or only use a tiny amount after extended run times then you don’t have an issue. To get an overview of memory usage open a terminal window and type “ free ” .
