[Solved] Why is LMDE using so much RAM?

Archived topics about LMDE 1 and LMDE 2
Locked
ellist

[Solved] Why is LMDE using so much RAM?

Post by ellist »

When I first got LMDE, it started out using around 300mb of ram all the time. Today, two days later I checked and it was using 1.1GB of RAM, a lot more than I expected (doing nothing but idleing on my desktop) So I restated my system and it started using 380mb, 10 minutes later with FF open it uses 480mb of ram. I was really hoping LMDE would use less memory than this.

Is there some way I can decrease memory usage? Is this abnormal?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
palimmo
Level 4
Level 4
Posts: 392
Joined: Sun Feb 03, 2013 9:55 am

Re: Why is LMDE using so much RAM?

Post by palimmo »

Firefox (one single tab) + System Monitor: 912MiB
.. quite a lot for me too..

LMDE 64bit + Cinnamon
LM Cinnamon 64bit
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: Why is LMDE using so much RAM?

Post by xenopeek »

Is it RAM actually used by programs, or by kernel buffers and cache? See this link for more information: http://www.linuxatemyram.com/. In addition to the kernel using unused memory for speeding up filesystem operations (with that memory still being considered free from a program's perspective), also Firefox has a memory cache (though that isn't freed up till you close all Firefox windows). You can set the size of the Firefox memory cache IIRC. Depending on what you are doing in Firefox, it might spike and use more memory (for Flash heavy websites, with Flash movies for example).
Image
ellist

Re: Why is LMDE using so much RAM?

Post by ellist »

Right now for me firefox (4 tabs) and system monitor is 621mb of ram. I am searching all over to find various ways of decreasing ram usage without getting rid of the cinnamon DE (it's my favorite).

From looking at the system monitor processes list, less than half of the memory being used is listed there (an estimate).
ellist

Re: Why is LMDE using so much RAM?

Post by ellist »

xenopeek wrote:Is it RAM actually used by programs, or by kernel buffers and cache? See this link for more information: http://www.linuxatemyram.com/. In addition to the kernel using unused memory for speeding up filesystem operations (with that memory still being considered free from a program's perspective), also Firefox has a memory cache (though that isn't freed up till you close all Firefox windows). You can set the size of the Firefox memory cache IIRC. Depending on what you are doing in Firefox, it might spike and use more memory (for Flash heavy websites, with Flash movies for example).
I read the entire link you sent me and ran the terminal command "free -m" and got the following results.
My Terminal wrote:_________________ total ____ used ___ free ___ shared ___ buffers ___ cached
_________________ 5806 ___ 1263 ___ 4542 ___ _ 0 ________ 41 ___ 666
-/+ buffers/cache: ___ 555 ___ 5251
Swap: ___ 1024 ___ 0 ___ 1024
From what I understand the caches and etc.. use roughly 550mb (this is when the syst. monitor says a total usage of 600mb. Kind of confused.
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: Why is LMDE using so much RAM?

Post by xenopeek »

Please put terminal output inside Code tags (see the Code button to the right of the Quote button you used). That preserves layout from the terminal.

Try closing all Firefox windows and seeing again. At least on my system, Firefox is the biggest consumer of memory. Anyway, you are not even using 10% of your system's RAM so I'm not sure what the concern is :)

Command that may be useful is the following. It shows all the processes on your system. In the first column showing percentage of your RAM the process is using. Second column shows the amount of physical RAM in use by the process, in KB. Third column shows the start time of the process. Fourth column shows the command used to launch the process. Sorted ascending on percentage of memory used.

Code: Select all

ps -eo %mem,rsz:8,stime,cmd --cumulative --sort %mem
Firefox with two tabs open on the Linux Mint forum is using just over 400 MB of memory here, but I've had it open for a while so it will have accumulated cache. Closing Firefox and running `free -m` shows about the same amount of memory now free. So is "LMDE using so much RAM" or is this just your web browser :wink:
Image
ellist

Re: Why is LMDE using so much RAM?

Post by ellist »

On my system, with 2 tabs it uses 175mb. From what I read earlier, the FF cache "uses up memory" in the sense that it is always available for other applications to use, but is marked as used on the system monitor, and the cache speeds up the performance of FF. What I have noticed though is that there is constantly MintUpdate.py running, even if I run the update manager as soon as I launch LMDE. It doesn't take up but 30mb of ram, but I am still just curious.

Most of the ram being used, really isn't my web browser, mabe about 1/3 of it, but that's not too much. I just thought that the rest was 'a lot' being used, but I guess that isn't the truth as shown with the free -m command (results at the very bottom). In reality I have 5393mb free of 5806mb meaning that 413mb is being used which is the same number I get from the system monitor which I guess isn't too bad. A ton less than what Windows 8 uses on the same laptop (2.1GB min). Thanks for helping me calm myself over worrying about nothing.

I am still curious as to why my PC would show 1.1GB being used when the system monitor takes into account all the cache memory and shows you only the "real memory usage". This is just a curiosity of mine :P I like to know as much as I can about whatever I am doing, and I am really new to linux.

Results from the script you asked me to run.

Code: Select all

 0.0        0 16:06 [kthreadd]
 0.0        0 16:06 [ksoftirqd/0]
 0.0        0 16:06 [migration/0]
 0.0        0 16:06 [watchdog/0]
 0.0        0 16:06 [cpuset]
 0.0        0 16:06 [khelper]
 0.0        0 16:06 [kdevtmpfs]
 0.0        0 16:06 [netns]
 0.0        0 16:06 [sync_supers]
 0.0        0 16:06 [bdi-default]
 0.0        0 16:06 [kintegrityd]
 0.0        0 16:06 [kblockd]
 0.0        0 16:06 [khungtaskd]
 0.0        0 16:06 [kswapd0]
 0.0        0 16:06 [ksmd]
 0.0        0 16:06 [khugepaged]
 0.0        0 16:06 [fsnotify_mark]
 0.0        0 16:06 [crypto]
 0.0        0 16:06 [khubd]
 0.0        0 16:06 [ata_sff]
 0.0        0 16:06 [scsi_eh_0]
 0.0        0 16:06 [scsi_eh_1]
 0.0        0 16:06 [scsi_eh_2]
 0.0        0 16:06 [scsi_eh_3]
 0.0        0 16:06 [scsi_eh_4]
 0.0        0 16:06 [scsi_eh_5]
 0.0        0 16:07 [jbd2/sda6-8]
 0.0        0 16:07 [ext4-dio-unwrit]
 0.0        0 16:07 [kpsmoused]
 0.0        0 16:07 [cfg80211]
 0.0        0 16:07 [scsi_eh_6]
 0.0        0 16:07 [rts_pstor]
 0.0        0 16:07 [rtsx-polling]
 0.0        0 16:07 [hd-audio0]
 0.0        0 16:07 [flush-8:0]
 0.0        0 16:07 [krfcommd]
 0.0        0 16:14 [kworker/u:18]
 0.0        0 16:31 [kworker/0:1]
 0.0        0 16:44 [kworker/0:0]
 0.0        0 16:44 [kworker/u:6]
 0.0        0 17:15 [migration/1]
 0.0        0 17:15 [kworker/1:1]
 0.0        0 17:15 [ksoftirqd/1]
 0.0        0 17:15 [watchdog/1]
 0.0        0 17:15 [migration/2]
 0.0        0 17:15 [kworker/2:3]
 0.0        0 17:15 [ksoftirqd/2]
 0.0        0 17:15 [watchdog/2]
 0.0        0 17:15 [migration/3]
 0.0        0 17:15 [kworker/3:4]
 0.0        0 17:15 [ksoftirqd/3]
 0.0        0 17:15 [watchdog/3]
 0.0        0 17:15 [kworker/3:0]
 0.0        0 17:15 [kworker/1:0]
 0.0        0 17:15 [kworker/2:0]
 0.0        0 17:15 [hci0]
 0.0        0 17:23 [kworker/0:2]
 0.0        0 17:26 [kworker/u:0]
 0.0        0 17:26 [kworker/1:2]
 0.0        0 17:26 [kworker/2:1]
 0.0       96 16:07 /usr/sbin/minissdpd -i 0.0.0.0
 0.0      152 16:07 /usr/sbin/atd
 0.0      328 16:07 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session 
 0.0      468 16:07 avahi-daemon: chroot helper
 0.0      492 16:07 /sbin/v86d
 0.0      508 16:07 /sbin/portmap
 0.0      572 16:07 sh -c /usr/lib/linuxmint/mintUpdate/mintUpdate.py
 0.0      580 16:07 /usr/bin/dbus-launch --exit-with-session x-session-manager
 0.0      584 16:07 dbus-launch --autolaunch 3c57545fd9007fcac1f08fcd00001118 --
 0.0      640 16:07 /usr/sbin/acpid
 0.0      780 17:23 gnome-pty-helper
 0.0      796 16:07 udisks-daemon: polling /dev/sdc /dev/sr0
 0.0      832 16:06 init [2]         
 0.0      844 16:07 /usr/sbin/cron
 0.0      932 16:07 /sbin/getty 38400 tty6
 0.0      936 16:07 /sbin/getty 38400 tty1
 0.0      936 16:07 /sbin/getty 38400 tty2
 0.0      940 16:07 /sbin/getty 38400 tty3
 0.0      940 16:07 /sbin/getty 38400 tty4
 0.0      944 16:07 /sbin/getty 38400 tty5
 0.0     1048 16:07 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 
 0.0     1128 17:27 ps -eo %mem,rsz:8,stime,cmd --cumulative --sort %mem
 0.0     1324 16:07 /usr/lib/rtkit/rtkit-daemon
 0.0     1452 17:15 udevd --daemon
 0.0     1460 16:07 /usr/sbin/smbd -D
 0.0     1504 16:07 /usr/sbin/rsyslogd -c5
 0.0     1508 17:15 udevd --daemon
 0.0     1568 16:07 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibilit
 0.0     1716 16:07 avahi-daemon: running [m5-481pt.local]
 0.0     1836 16:07 /usr/sbin/nmbd -D
 0.0     1848 16:07 udevd --daemon
 0.0     1940 16:07 /usr/sbin/bluetoothd
 0.0     1996 16:07 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 9 
 0.0     2096 16:07 /usr/bin/dbus-daemon --system
 0.0     2152 16:07 /usr/sbin/mdm
 0.0     2168 16:07 /usr/bin/freshclam -d --quiet
 0.0     2372 16:22 /usr/lib/gvfs/gvfsd-metadata
 0.0     2392 16:07 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:110
 0.0     2524 16:07 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
 0.0     2620 16:07 /usr/lib/gvfs/gvfs-afc-volume-monitor
 0.0     2644 16:07 /usr/lib/gvfs/gvfsd
 0.0     2860 16:08 /usr/lib/dconf/dconf-service
 0.0     3104 16:07 /usr/sbin/modem-manager
 0.0     3184 16:07 /sbin/wpa_supplicant -u -s -O /var/run/wpa_supplicant
 0.0     3204 16:07 /usr/lib/pulseaudio/pulse/gconf-helper
 0.0     3348 16:07 /usr/sbin/smbd -D
 0.0     3380 16:07 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
 0.0     3384 16:07 /usr/lib/x86_64-linux-gnu/gconf/gconfd-2
 0.0     3396 16:07 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
 0.0     3512 16:16 /usr/lib/at-spi2-core/at-spi-bus-launcher
 0.0     3564 16:07 /usr/lib/gvfs/gvfsd-trash --spawner :1.6 /org/gtk/gvfs/exec_
 0.0     3568 17:23 bash
 0.0     3692 16:07 /usr/lib/at-spi2-core/at-spi-bus-launcher
 0.0     3704 17:15 /sbin/dhclient -d -4 -sf /usr/lib/NetworkManager/nm-dhcp-cli
 0.0     3864 16:07 /usr/sbin/console-kit-daemon --no-daemon
 0.0     3896 16:07 /usr/sbin/mdm
 0.0     4244 16:07 /usr/bin/gnome-keyring-daemon --daemonize --login
 0.0     4244 16:07 /usr/lib/udisks/udisks-daemon
 0.0     4364 16:07 /usr/lib/gvfs/gvfs-gdu-volume-monitor
 0.0     4680 16:07 /usr/lib/gnome-settings-daemon/gsd-printer
 0.0     4740 16:07 /usr/lib/x86_64-linux-gnu/colord/colord
 0.0     5084 16:07 /usr/lib/policykit-1/polkitd --no-debug
 0.0     5296 16:07 /usr/lib/upower/upowerd
 0.0     5364 16:07 /usr/bin/python /usr/bin/mintupdate-launcher
 0.0     5776 16:07 /usr/sbin/NetworkManager
 0.1     6828 16:07 /usr/bin/pulseaudio --start --log-target=syslog
 0.1     8204 16:07 cinnamon-screensaver
 0.1     8788 16:07 gnome-session --session cinnamon
 0.1    11172 16:07 /usr/lib/x86_64-linux-gnu/colord/colord-sane
 0.2    15300 16:07 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent
 0.2    16240 16:07 /usr/bin/X :0 -audit 0 -auth /var/lib/mdm/:0.Xauth -nolisten
 0.2    17040 16:07 /usr/bin/python /usr/bin/cinnamon-launcher
 0.2    17292 17:23 gnome-terminal
 0.3    19496 16:07 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
 0.3    23692 16:07 /usr/bin/python /usr/bin/system-config-printer-applet
 0.4    28468 16:07 nm-applet
 0.4    28820 17:20 gnome-system-monitor
 0.5    31196 16:07 python /usr/lib/linuxmint/mintUpdate/mintUpdate.py
 1.8   109884 17:23 /opt/firefox/firefox
 1.9   115120 16:07 cinnamon --replace

Code: Select all

             total       used       free     shared    buffers     cached
Mem:          5806       1134       4672          0         44        676
-/+ buffers/cache:        412       5393
Swap:         1024          0       1024
srq2625

Re: Why is LMDE using so much RAM?

Post by srq2625 »

ellist wrote:

Code: Select all

             total       used       free     shared    buffers     cached
Mem:          5806       1134       4672          0         44        676
-/+ buffers/cache:        412       5393
Swap:         1024          0       1024
The description/analysis of above

Code: Select all

First line:
Total  --> The amount of memory in your system
Used   --> The sum of memory actively used by programs + that use by cache
Free   --> The difference between Total and "Used" in the second line
Cached --> Memory used to speed things up, that can be freely returned to the memory pool for application use

Second Line:
Used   --> The amount of memory actively used by applications
Free   --> Difference between total (first line) and Used (second line)

Third Line:
Total  --> Total size of your swap file/partition
Used   --> Amount of swap used
Free   --> Amount of swap available should the need arise
In summary, your system is actively using only 412MB but is making use of an additional 676MB to help improve the user experience. Any and all of that 676MB can and will be returned to the system should the need arise. Using cache is a good thing in the sense that unused memory is wasted memory.
Locked

Return to “LMDE Archive”