LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 12-01-2019, 12:01 PM   #1
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 35

Rep: Reputation: 1
Unhappy Early swap usage


Hello.

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 ?
 
Old 12-01-2019, 08:53 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,619
Blog Entries: 26

Rep: Reputation: 4555Reputation: 4555Reputation: 4555Reputation: 4555Reputation: 4555Reputation: 4555Reputation: 4555Reputation: 4555Reputation: 4555Reputation: 4555Reputation: 4555
What does top or htop tell you about memory usage?
 
Old 12-03-2019, 04:33 AM   #3
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 35

Original Poster
Rep: Reputation: 1
Please see imgur album here : https://imgur.com/a/ba7FR6j
 
Old 12-03-2019, 04:53 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,288

Rep: Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993
Quote:
Originally Posted by ychaouche View Post
isn't swap supposed to be used only if RAM is full ? can I do something about it ?
No and no.
Swap is a resource available to the memory management system to manage and balance as it sees fit. Many man years of effort by a bunch of very smart people have gone into the code.
Go find a real problem to worry about. If it really worries you, issue a swapoff/swapon.
 
Old 12-03-2019, 05:02 AM   #5
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 35

Original Poster
Rep: Reputation: 1
Ah, this is good to know. The real problem that worries me is the system being slow after some time. I have linked this with swap usage because many times when system becomes unresponsive, I see one or two processes in "disk sleep" state, which means they are waiting for data from disk (could writes also be blocking ? dunno), which is why I thought maybe they are reading from the swap file (since the monitoring tools show swap usage). But after reading your post I assume swap is not an indicator of poor system health.
 
Old 12-03-2019, 05:39 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,266

Rep: Reputation: 4200Reputation: 4200Reputation: 4200Reputation: 4200Reputation: 4200Reputation: 4200Reputation: 4200Reputation: 4200Reputation: 4200Reputation: 4200Reputation: 4200
www.linuxatemyram.com will explain some details.
 
Old 12-03-2019, 01:14 PM   #7
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 2,410

Rep: Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566Reputation: 566
Code:
cat /proc/sys/vm/swappiness
60
You can change that.
https://wiki.archlinux.org/index.php/Swap#Swappiness

Look at your distros docs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does a swap usage of 100% indicates swapping despite low memory usage? redhatwannabe Linux - Hardware 9 12-09-2018 08:42 AM
'Cognitive performance may peak in late summer and early fall and decline in late winter and early spring - at least in the Northern hemisp RandomTroll General 2 11-16-2018 04:12 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 05:45 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 08:58 PM
Activating swap partition early in install Septus Linux - Newbie 3 09-10-2003 11:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration