Improve memory usage in Debian

New to Debian (Or Linux in general)? Ask your questions here!

Improve memory usage in Debian

Postby PsySc0rpi0n » 2019-06-22 12:55

Hello.

Is it possible to free memory or somehow check if is there any memory "hanging up" somewhere in my system?

I have 16Gb of memory in a laptop and I have no so called heavy programs running. I have a few programs running though, like Discord, Skype, Telegram, irssi, rtorrent Chromium (like 15 tabs open), AnyDesk, Atom (text editor) and not much more and I always have indication from htop of being using 12Gb of memory and more. Swap also shows up pretty used. Of 4.87Gb, almos 3Gbs are being used.

Isn't this too much for what I have running in my laptop? Can I check if is there anything wrong with memory usage or swap usage? What can I do to at least check if this is ok?

This is how my htop looks like:
Image

Why Chromium has that red time value? Why is it in red?
User avatar
PsySc0rpi0n
 
Posts: 115
Joined: 2012-10-24 13:54
Location: Portugal

Re: Improve memory usage in Debian

Postby sickpig » 2019-06-22 13:02

though u haven't confirmed but I know u r using gnome
solution
dont
User avatar
sickpig
 
Posts: 317
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

Postby PsySc0rpi0n » 2019-06-22 13:07

sickpig wrote:though u haven't confirmed but I know u r using gnome
solution
dont


It's not Gnome. It's Plasma Desktop!

Which lighter Desktop you recommend? I don't want the simplest and most memory light desktop. I just want one that can bare with my laptop. I know a few like LXDE, XFCE but maybe those are too simple?
User avatar
PsySc0rpi0n
 
Posts: 115
Joined: 2012-10-24 13:54
Location: Portugal

Re: Improve memory usage in Debian

Postby sickpig » 2019-06-22 13:16

plasma is evil twin of gnome :)
try lxde and experience how responsive your system becomes
and geez 15 open tabs? y? thats just inefficient way of working(sorry for being rude)
try a tab suspender or some extension
the best way is to change your workflow and not open a so many tabs
i cant imagine a scenario wherein anything could be productive with so many tabs open
also remove any superfluous browser extensions which you might have
User avatar
sickpig
 
Posts: 317
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

Postby PsySc0rpi0n » 2019-06-22 13:37

sickpig wrote:plasma is evil twin of gnome :)
try lxde and experience how responsive your system becomes
and geez 15 open tabs? y? thats just inefficient way of working(sorry for being rude)
try a tab suspender or some extension
the best way is to change your workflow and not open a so many tabs
i cant imagine a scenario wherein anything could be productive with so many tabs open
also remove any superfluous browser extensions which you might have


The 15 tabs is just to avoid be opening them every time I need to read something from there. I have just a couple of extensions. Not many. Or maybe I have some. But I feel I need them all. At least 18 add-ons.

Anyway, what about the red time of my htop for Chromium? And also what means that column called 'S' between 'SHR' and CPU%?
User avatar
PsySc0rpi0n
 
Posts: 115
Joined: 2012-10-24 13:54
Location: Portugal

Re: Improve memory usage in Debian

Postby andre@home » 2019-06-22 13:45

sickpig wrote:the best way is to change your workflow and not open a so many tabs
i cant imagine a scenario wherein anything could be productive with so many tabs open
I've a multiple amount of tabs of that 15....
Sometimes make a backup of them to a spreadsheet.
When you are working... on several things.. it is not very handy to be limited to very little amount of tabs...
So your perfect workflow does not need to be mine....
I mostly use Opera for that under Debian 8 & Windows...
So far never had a problem with so many tabs open, most problems are coming from other programs (under Windows the virusscanner..... ;) ).
andre@home
 
Posts: 347
Joined: 2011-10-02 08:00

Re: Improve memory usage in Debian

Postby sickpig » 2019-06-22 13:56

andre@home wrote:[I've a multiple amount of tabs of that 15....
Sometimes make a backup of them to a spreadsheet.
When you are working... on several things.. it is not very handy to be limited to very little amount of tabs...
So your perfect workflow does not need to be mine....


Excellent more power to u
open as many as u can thats the way. hope u can still c the title of the webpape on that tab amongst more than 15 of yours though :lol:
User avatar
sickpig
 
Posts: 317
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

Postby andre@home » 2019-06-22 13:59

off topic;
Opera has a search engine for the tabs... 8) :lol:
Very handy... 8)
Time to go to school again.... :mrgreen: :lol:
andre@home
 
Posts: 347
Joined: 2011-10-02 08:00

Re: Improve memory usage in Debian

Postby sickpig » 2019-06-22 14:01

PsySc0rpi0n wrote:[18 add-ons.

really!? :!:
u know each of those addons consumes RAM right? atleast 100mb probably each, thats ur 2 Gig right there

sorry i dont use either htop or chromium so i have no clue about below

PsySc0rpi0n wrote:[Anyway, what about the red time of my htop for Chromium? And also what means that column called 'S' between 'SHR' and CPU%?
User avatar
sickpig
 
Posts: 317
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

Postby Head_on_a_Stick » 2019-06-22 15:28

@OP: please post the output of
Code: Select all
free -h

It would also help to see what ps_mem says about individual programs' memory consumption:
Code: Select all
git clone https://github.com/pixelb/ps_mem && cd ps_mem
sudo ./ps_mem.py # or: su -c './ps_mem.py'

Here are my outputs for reference:
Code: Select all
E485:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           15Gi       544Mi        14Gi        52Mi       662Mi        14Gi
Swap:         4.0Gi          0B       4.0Gi
E485:~$ sudo ps-mem
 Private  +   Shared  =  RAM used       Program

220.0 KiB +  51.5 KiB = 271.5 KiB       startx
280.0 KiB + 151.5 KiB = 431.5 KiB       xinit
300.0 KiB + 153.5 KiB = 453.5 KiB       slstatus
312.0 KiB + 181.5 KiB = 493.5 KiB       cron
580.0 KiB + 147.5 KiB = 727.5 KiB       alsactl
904.0 KiB + 259.5 KiB =   1.1 MiB       login
748.0 KiB + 589.5 KiB =   1.3 MiB       loksh (3)
  1.0 MiB + 324.5 KiB =   1.3 MiB       sudo
960.0 KiB + 765.5 KiB =   1.7 MiB       dwm
  1.0 MiB + 860.5 KiB =   1.8 MiB       systemd-timesyncd
  1.0 MiB + 948.0 KiB =   1.9 MiB       dbus-daemon (2)
  1.2 MiB + 790.5 KiB =   2.0 MiB       systemd-logind
  1.0 MiB +   1.6 MiB =   2.6 MiB       systemd-udevd (2)
  2.4 MiB + 793.5 KiB =   3.2 MiB       systemd-journald
  3.3 MiB +  50.5 KiB =   3.4 MiB       wpa_supplicant
  3.1 MiB +   4.5 MiB =   7.6 MiB       systemd (3)
 12.4 MiB +   3.1 MiB =  15.6 MiB       xterm (2)
 41.9 MiB +  20.8 MiB =  62.7 MiB       Xorg
346.4 MiB +  99.7 MiB = 446.1 MiB       firefox-esr (3)
---------------------------------
                        554.7 MiB
=================================
E485:~$

I have 10 tabs open in FF.
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10600
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Improve memory usage in Debian

Postby arochester » 2019-06-22 15:33

It might be 'buntu but there is some useful information here https://askubuntu.com/questions/2194/ho ... erformance

Do you have a HDD or a SDD?

Do you need all the tabs all the time? Or, could you put them in a folder, open all and close them as you finish with them?

Do you autostart programs? Do you need to?
arochester
 
Posts: 1558
Joined: 2010-12-07 19:55

Re: Improve memory usage in Debian

Postby Wheelerof4te » 2019-06-22 16:23

PsySc0rpi0n wrote:I have no so called heavy programs running. I have a few programs running though, like Discord, Skype, Telegram, irssi, rtorrent Chromium (like 15 tabs open), AnyDesk, Atom

That is a pretty hefty list of heavy-hitters, especially if you are running all of them at once.
You could reduce swappiness, at least that is what I would advise you to do. You need only about 15, the default is 60, which is way too high.
Code: Select all
nano /etc/sysctl.conf

Place vm.swappiness=15 at the end of that file. Save and reboot. This way, your system will prefer more RAM over swapping every time you hit 40% of your max RAM.

Also, ignore sickpig and everyone else who keeps bragging about their DE/WM choices. I am running GNOME, which is considered heavier than Plasma, and I'm not having much problems on a entry to mid level laptop. Your problem lies elsewhere. Try to reduce the amount of autostarted applications. Use recent versions of Chromium, the ones in Stretch and Buster are outdated. Or switch to Firefox for a while and test.

If you are still on Stretch, it would be beneficial to upgrade to Buster, as Plasma 5.14 is much faster and lighter than 5.8 in Stretch.
Wheelerof4te
 
Posts: 1423
Joined: 2015-08-30 20:14

Re: Improve memory usage in Debian

Postby CwF » 2019-06-22 17:08

I guess it depends on how we do things, huh. My current tally arranged in my way suggest window and tab count don't tell the whole story. Currently, 105 tabs and 24 windows, 18968 MB ram, 580 MB swap. 34 days up. No issue.
CwF
 
Posts: 501
Joined: 2018-06-20 15:16

Re: Improve memory usage in Debian

Postby andre@home » 2019-06-22 20:30

I have the same experience.
andre@home
 
Posts: 347
Joined: 2011-10-02 08:00

Improve memory usage in Debian

Postby PsySc0rpi0n » 2019-06-22 21:11

Jeeezzz. From what I read of other's experiences, I should have no problems. I'm not at the PC but I'll try to run those commands to see what I get. I know that Chromium is most likely the coolprit. I closed all applications but Chromium and RAM went down to about 8Gb and swap just slightly decreased.

Sent from my SM-G935F using Tapatalk
User avatar
PsySc0rpi0n
 
Posts: 115
Joined: 2012-10-24 13:54
Location: Portugal

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable