LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 01-29-2020, 06:30 PM   #1
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Rep: Reputation: 84
Why isn’t Linux using more than 2.1 GB of RAM


Why isn’t Linux using more than 2.1 GB of RAM. I don’t think I have ever seen it use more.

My laptop
Intel i5 520M @ 2.40 GHz
dual core with HT

2 SODIMM
DDR3, 2 GB each
Speed 1067 MHz
4 GB total.

3.7 GB is available to the OS. Obviously, this laptop has an integrated Intel GPU.


I am running Kubuntu 18.04.3 LTS.
Firefox, Qt Creator, 6 Dolphin windows open, 2 console windows open, Kate open, 3 LibreOffice documents open,
Linux slows down too much since a lot of disk swapping is taking place.

KsysGuard shows that 2.1 GB of RAM is being used and 1.1 GB of swap file.
That doesn’t make sense when 3.7 GB is installed in the system.
1.6 GB is still free. That’s 43% free.

Am I the first guy who has noticed this? Is there something wrong with a RAM stick?
I could perhaps run memtest86.
It can’t be, since it is using 2.1 GB and the GPU is using 256 MB.
 
Old 01-29-2020, 07:06 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Code:
cat /proc/meminfo
 
Old 01-29-2020, 07:33 PM   #3
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Quote:
Originally Posted by vmelkon View Post
Why isn’t Linux using more than 2.1 GB of RAM. I don’t think I have ever seen it use more.

Because GNU/Linux is a very efficient operating system and it's NOT MS Windows.


Code:
vtel57@ericsbane07~:$ cat /proc/meminof
cat: /proc/meminof: No such file or directory
vtel57@ericsbane07~:$ cat /proc/meminfo
MemTotal:       12279756 kB
MemFree:         9763504 kB
MemAvailable:   10436232 kB
Buffers:          109004 kB
Cached:          1080576 kB
SwapCached:            0 kB
Active:          1603936 kB
Inactive:         685048 kB
Active(anon):    1101016 kB
Inactive(anon):   125492 kB
Active(file):     502920 kB
Inactive(file):   559556 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:      14147576 kB
SwapFree:       14147576 kB
Dirty:               588 kB
Writeback:             0 kB
AnonPages:       1099420 kB
Mapped:           456156 kB
Shmem:            127116 kB
Slab:             100572 kB
SReclaimable:      65028 kB
SUnreclaim:        35544 kB
KernelStack:        9744 kB
PageTables:        27908 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    20287452 kB
Committed_AS:    3060876 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
AnonHugePages:    161792 kB
DirectMap4k:      158656 kB
DirectMap2M:     7178240 kB
DirectMap1G:     5242880 kB
 
Old 01-29-2020, 08:06 PM   #4
andigena
Member
 
Registered: Sep 2019
Location: USA
Distribution: nixos, but i prefer plan 9
Posts: 141

Rep: Reputation: 66
Ignore this post.

Last edited by andigena; 01-29-2020 at 08:58 PM. Reason: incorrect info
 
Old 01-29-2020, 08:25 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Rubbish.
A quick search found this article. Covers it pretty well I think.
 
3 members found this post helpful.
Old 01-29-2020, 11:19 PM   #6
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by vtel57 View Post
Because GNU/Linux is a very efficient operating system and it's NOT MS Windows.
Actually Linux is lighter on RAM.
Windows is also a HDD abuser since Windows Vista. Linux is lighter on the HDD read/write, specially when I log on.
With Windows, there is this process called lass.exe that hogs the HDD for 2 min when I log in. MS also added CompatTellRunner.exe that randomly starts doing I/O on your HDD.
 
1 members found this post helpful.
Old 01-29-2020, 11:24 PM   #7
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by syg00 View Post
Rubbish.
A quick search found this article. Covers it pretty well I think.
Thanks for the link. I had no idea that is the way Linux categorizes RAM.

By default, it is 60.
I tried
sudo sysctl vm.swappiness=30
and the system seems fine for now but I am not on that laptop I was talking about. This is a desktop with 4 GB RAM.
It is using 2.3 GB RAM and 680 MB swap for the moment. I have the same software usage pattern on both machines.
 
Old 01-30-2020, 12:05 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
You still haven't provided the data asked for in my initial post.
 
Old 01-30-2020, 02:19 PM   #9
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by syg00 View Post
You still haven't provided the data asked for in my initial post.
Sorry about that.
I am back at this laptop and here are the results after some usage, opening apps, like I listed before.

Code:
MemTotal:        3897784 kB
MemFree:          815008 kB
MemAvailable:    1069908 kB
Buffers:           20372 kB
Cached:           786468 kB
SwapCached:        53112 kB
Active:          1876372 kB
Inactive:         986716 kB
Active(anon):    1753252 kB
Inactive(anon):   679196 kB
Active(file):     123120 kB
Inactive(file):   307520 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       2097148 kB
SwapFree:        1409788 kB
Dirty:               552 kB
Writeback:             0 kB
AnonPages:       2006000 kB
Mapped:           546084 kB
Shmem:            376200 kB
Slab:             103164 kB
SReclaimable:      52928 kB
SUnreclaim:        50236 kB
KernelStack:       11056 kB
PageTables:        63384 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4046040 kB
Committed_AS:    6008404 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      201084 kB
DirectMap2M:     3852288 kB

Last edited by vmelkon; 01-30-2020 at 09:26 PM. Reason: Added code tag
 
Old 01-30-2020, 05:35 PM   #10
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84
This is a few hours laters:

Code:
MemTotal:        3897784 kB
MemFree:          921400 kB
MemAvailable:    1060544 kB
Buffers:           13340 kB
Cached:           835728 kB
SwapCached:        34564 kB
Active:          1819092 kB
Inactive:         929808 kB
Active(anon):    1702956 kB
Inactive(anon):   729160 kB
Active(file):     116136 kB
Inactive(file):   200648 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       2097148 kB
SwapFree:         232432 kB
Dirty:              3780 kB
Writeback:             0 kB
AnonPages:       1869744 kB
Mapped:           640148 kB
Shmem:            532236 kB
Slab:             103364 kB
SReclaimable:      49120 kB
SUnreclaim:        54244 kB
KernelStack:       11600 kB
PageTables:        71688 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4046040 kB
Committed_AS:    7775644 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      237948 kB
DirectMap2M:     3815424 kB

Last edited by vmelkon; 01-30-2020 at 09:26 PM. Reason: Added code tag
 
Old 01-30-2020, 06:43 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Try this to display memory users.
Code:
ps k-size -ef | head -n 20
And use [code] tags for all output, not [quote] - else the layout will be lost, and unreadable.
 
1 members found this post helpful.
Old 01-31-2020, 05:01 PM   #12
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by syg00 View Post
Try this to display memory users.
Code:
ps k-size -ef | head -n 20
And use code tags for all output, not quote - else the layout will be lost, and unreadable.
Here it is
Code:
UID        PID  PPID  C STIME TTY      STAT   TIME CMD                                                                                                                                                   
john      1180  1174  3 11:40 ?        Sl    14:19 kwin_x11 -session 109a999d9c000157961377200000009810005_1580432405_49895                                                                              
john      1194     1  0 11:40 ?        Sl     1:03 /usr/bin/plasmashell                                                                                                                                  
john      1733  1194  1 11:43 ?        Sl     5:03 /opt/Qt/Tools/QtCreator/bin/qtcreator                                                                                                                 
john      1451  1194  4 11:41 ?        Sl    17:33 /usr/lib/firefox/firefox                                                                                                                              
john      1739  1733  1 11:43 ?        S      7:12 /opt/Qt/Tools/QtCreator/libexec/qtcreator/clangbackend /tmp/QtCreator-tFJAhn/ClangBackEnd-1733                                                        
john     14638  1451  8 14:22 ?        Sl    17:56 /usr/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 9178 -prefMapSize 209202 -parentBuildID 20200117190643 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 1451 true tab                                                                                                       
john      1510  1451  8 11:42 ?        Sl    33:21 /usr/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 1 -prefMapSize 209202 -parentBuildID 20200117190643 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 1451 true tab                                                                                                          
john      1119  1115  0 11:40 ?        Sl     0:10 kded5 [kdeinit5]                                                                                                                                      
john     17358  1451  0 16:02 ?        Sl     1:08 /usr/lib/firefox/firefox -contentproc -childID 11 -isForBrowser -prefsLen 9411 -prefMapSize 209202 -parentBuildID 20200117190643 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 1451 true tab                                                                                                      
john      1539  1451  0 11:42 ?        Sl     3:23 /usr/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 1 -prefMapSize 209202 -parentBuildID 20200117190643 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 1451 true tab                                                                                                          
john     11886 11868  0 12:18 ?        Sl     0:54 /usr/lib/libreoffice/program/soffice.bin --splash-pipe=5                                                                                              
john      1579  1451  0 11:42 ?        Sl     0:15 /usr/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 6170 -prefMapSize 209202 -parentBuildID 20200117190643 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 1451 true tab                                                                                                       
root      1410     1  0 11:41 ?        Ssl    0:32 /usr/lib/packagekit/packagekitd                                                                                                                       
john      1708  1194  0 11:42 ?        Sl     0:18 /usr/bin/dolphin                                                                                                                                      
john      3120  1115  0 11:47 ?        Sl     0:17 /usr/bin/dolphin /media/john/Verbatim10                                                                                                               
root       784   771  4 11:40 tty1     Ssl+  17:01 /usr/lib/xorg/Xorg -nolisten tcp -auth /var/run/sddm/{6ea1c0cc-bd11-4da7-a049-93e6cd12e503} -background none -noreset -displayfd 18 -seat seat0 vt1   
mpd        763     1  0 11:40 ?        Ssl    0:00 /usr/bin/mpd --no-daemon                                                                                                                              
john      3318  1451  0 11:52 ?        Sl     0:34 /usr/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 8539 -prefMapSize 209202 -parentBuildID 20200117190643 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 1451 true tab
john     18361  1451  0 16:42 ?        Sl     0:03 /usr/lib/firefox/firefox -contentproc -childID 13 -isForBrowser -prefsLen 9411 -prefMapSize 209202 -parentBuildID 20200117190643 -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 1451 true tab

Last edited by vmelkon; 01-31-2020 at 05:02 PM. Reason: cleanup
 
Old 01-31-2020, 06:49 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
- my bad, I was playing with different commands and gave you the wrong one. Try it as -eF (capital F).
We can probably do without all the path as well.
Code:
ps k-size c -eF | head -n 20

Last edited by syg00; 01-31-2020 at 07:10 PM. Reason: added updated command
 
Old 02-01-2020, 10:26 PM   #14
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Original Poster
Rep: Reputation: 84
Quote:
Originally Posted by syg00 View Post
- my bad, I was playing with different commands and gave you the wrong one. Try it as -eF (capital F).
We can probably do without all the path as well.
Code:
ps k-size c -eF | head -n 20
I'll just post
cat /proc/meminfo
and
ps k-size c -eF | head -n 20

Code:
MemTotal:        3897784 kB
MemFree:          129120 kB
MemAvailable:     307600 kB
Buffers:           18216 kB
Cached:           913396 kB
SwapCached:       122080 kB
Active:          2624040 kB
Inactive:         919140 kB
Active(anon):    2534800 kB
Inactive(anon):   651988 kB
Active(file):      89240 kB
Inactive(file):   267152 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       2097148 kB
SwapFree:        1112816 kB
Dirty:               844 kB
Writeback:             0 kB
AnonPages:       2551560 kB
Mapped:           625656 kB
Shmem:            575204 kB
Slab:             101296 kB
SReclaimable:      48252 kB
SUnreclaim:        53044 kB
KernelStack:       11376 kB
PageTables:        70372 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4046040 kB
Committed_AS:    7835896 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      188796 kB
DirectMap2M:     3864576 kB
Code:
UID        PID  PPID  C    SZ   RSS PSR STIME TTY      STAT   TIME CMD                                                                                                                                   
john      1222  1210  2 1000904 270900 0 10:52 ?       Sl    19:15 kwin_x11                                                                                                                              
john      1234     1  0 1074805 116520 2 10:52 ?       Sl     1:09 plasmashell                                                                                                                           
john      1491  1234  7 1029200 556788 1 10:55 ?       Sl    55:34 firefox                                                                                                                               
john      1579  1491  4 865067 240444 1 10:55 ?        Sl    31:01 Web Content                                                                                                                           
john      1551  1491  9 811491 357140 0 10:55 ?        Sl    71:16 Web Content                                                                                                                           
john      2913  1234  0 464101 154552 2 11:58 ?        Sl     1:16 qtcreator                                                                                                                             
john      4720  1491  1 803008 213028 3 16:23 ?        Sl     5:16 Web Content                                                                                                                           
john      8056  1491  9 803483 321788 3 22:38 ?        Sl     4:08 Web Content                                                                                                                           
john      2919  2913  0 177692 84344  1 11:58 ?        S      2:06 clangbackend                                                                                                                          
john      7657  1491  2 750796 217064 2 21:45 ?        Sl     2:15 Web Content                                                                                                                           
john      1180  1176  0 434343 14600  1 10:52 ?        Sl     0:10 kded5                                                                                                                                 
john      5131  1491  2 703271 165172 0 17:09 ?        Sl    10:33 Web Content                                                                                                                           
john      8563  1234  0 278217 124856 0 23:19 ?        Sl     0:01 systemsettings5                                                                                                                       
john      3054  3036  0 346901 144768 1 12:00 ?        Sl     0:29 soffice.bin                                                                                                                           
john      4561  1491  0 648571 62616  2 16:00 ?        Sl     1:25 Web Content                                                                                                                           
john      1474  1234  0 442987 26244  3 10:54 ?        Sl     0:12 dolphin                                                                                                                               
root       777   767  4 150683 156772 1 10:50 tty1     Ssl+  33:26 Xorg                                                                                                                                  
john      1643  1491  0 646061 55572  3 10:55 ?        Sl     0:26 WebExtensions                                                                                                                         
root      1380     1  0 128617  700   3 10:53 ?        Ssl    0:08 packagekitd
 
Old 02-02-2020, 03:03 AM   #15
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,910

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
actually you may try to switch off swap completely. I used to suggest the following page: www.linuxatemyram.com to understand [better] how does it work (and there is a link at the bottom to go further - if interested).
 
  


Reply



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
Firefox using more ram than chromium, and causes higher cpu temps, why? keikari Linux - Software 3 12-07-2019 06:34 PM
Why isn't fast retransmit triggered with more than 3 DUP acks chengtcli Linux - Newbie 0 08-29-2016 12:44 PM
Why size of swap space is 2x of RAM??? Why not 1.5x of RAM or 2.5x of RAM??? Saurav Ghosh Linux - Newbie 7 11-01-2011 03:49 AM
fixed ip for more than 1 nic - more than 1 network - multi homed zimbot Ubuntu 1 07-05-2011 05:21 PM
Can I've more than 6 virt consoles (and can I launch more than 2 GUIs simultaneosly)? kornerr Linux - General 6 02-24-2005 02:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 08:51 PM.

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
Open Source Consulting | Domain Registration