Linux Format

Answers

Q Early swap usage

I’m using Kubuntu 19.10 and noticed that swap was used very early after starting the desktop, even if there’s still RAM available (4GB RAM, KDE Plasma desktop). How can I troubleshoot what’s causing this early use of swap? isn’t swap supposed to be used only if RAM is full? Can I do something about it?

Leon Butcher

A This is not a problem to be solved, it is the system working as it should. Memory management in Linux is both advanced and mature – years have gone into optimising it. Data is moved from memory to swap because it is unlikely to be needed but has to remain available in memory in some form. For example, code used when starting up system services may not need to be accessed once those services are running, so it can be safely paged to swap.

Linux will try to use all the memory available to it. RAM not occupied with code or data will be used for filesystem caching to speed up disk usage. So swapping out unneeded data can make your system faster. It is also worth bearing in mind that if RAM does become short and the system needs to swap out

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format2 min read
For The Experts
Hyper’s reliance on a text file for configuration will appeal to many more experienced Linux users, and it’s a boon that Hyper both scans for changes to the file and can open the file via the main menu. In theory, you could customise how this termina
Linux Format8 min read
Create A Fyne Journaling App
Credit: https://fyne.io Over the past decade, we have seen great improvements in the graphical software user experience and corresponding advancements in the tools that are used to create compelling apps for our phones and tablets. Unfortunately, bui
Linux Format3 min read
QIDI Tech Q1 Pro
It feels like QIDI Tech has been sitting in the back of the room, taking notes while we discuss other 3D printers’ flaws. The Q1 Pro fixes many of the little problems: it eliminates levelling guesswork by setting its own Z height; the spool holder is

Related Books & Audiobooks