Improve memory usage in Debian

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Improve memory usage in Debian

#31 Post by Wheelerof4te »

PsySc0rpi0n wrote:Isn't any of those apps critical to the system? I mean not even 'systemd', 'kded4', 'dbus eamon', 'gnome-keyring-deamon', etc???
People here most likely think of systemd services. Disabling some of them you don't use might improve your boot time and CPU usage a bit, but any impact on RAM will be negligible.
And if you disable the wrong one, your system can become unstable. I would advise against this. As HoAS said, maybe trying out another browser can improve the situation.
sickpig wrote:or try the below in sysctl.conf

CODE: SELECT ALL
vm.swappiness = 0
vm.vfs_cache_pressure=15
Never reduce swappiness to 0. And I mean, never.
sickpig wrote:I use this https://github.com/oguzhaninan/Stacer/r ... tag/v1.1.0 for managing startup apps, services and much more.
Again, you don't have to do this. Your problem is likely the browser (Chromium).

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Improve memory usage in Debian

#32 Post by Wheelerof4te »

sickpig wrote:dbus is a dependency for systemd, i tried turning it off but my login crashes and i automatically re-login. So i wouldn't touch that.
'systemd', 'kded4', of course you would need..
Suggesting to disable dbus proves you have no idea what you're talking about. Please refrain from advising such things in the future.

User avatar
Hallvor
Posts: 1190
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 4 times
Been thanked: 2 times

Re: Improve memory usage in Debian

#33 Post by Hallvor »

sickpig wrote:looks beautiful and sleek for sure
but anything which uses above 100mb RAM after boot scares me off
I don't get this obsession of low memory usage on an empty desktop. It really doesn't matter at all, unless you like to stare at it, doing nothing. What matters, if RAM is so precious that you pay for it without wanting to use it, is how much RAM is being used when running the applications you use for your daily tasks.
Last edited by Hallvor on 2019-06-23 11:05, edited 1 time in total.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

User avatar
PsySc0rpi0n
Posts: 262
Joined: 2012-10-24 13:54
Location: Portugal

Re: Improve memory usage in Debian

#34 Post by PsySc0rpi0n »

sickpig wrote:no no yes of course they are, am not saying all of them are useless, I meant research which ones can be safely turned off.
There are plenty of guides out there detailing which can be safely turned off.

edit
from the ones u listed i safely turned of gnome-keyring-deamon and it has not interrupted my work flow but i m not using a DE as such so my use case might not be applicable to you. dbus is a dependency for systemd, i tried turning it off but my login crashes and i automatically re-login. So i wouldn't touch that.
'systemd', 'kded4', of course you would need.

If in doubt leave it on.

I have no idea of what apps I could possibly stop. There are so many there. I would have to search each one and try to check if they are critical or not.
Although I'm not using Gnome, there are still some apps there with the name Gnome on it like gnome-keyring-eamon. I also have gpg-agent, so I'm not sure I can remove gnome-keyring-deamon.

I know only that I can stop teamviewerd, MusicManager, proftpd I think I can also remove. But most of the apps, I have no idea!


Edited;
Yeah, I'm not gonna mess much with autostarting apps other the ones I really know.
What I could possibly ask is for help detecting apps, for instance, belonging to Gnome (I used Gnome in the past, so maybe apps got behind when I changed Desktop) that I can uninstall and replace for proper ones belonging to KDE Plasma Desktop.

And yes,Chromium is the coolpritt of this amount of RAM used. I have just added a new add-on to block scripts from being ran an I'll try to manage them an enable only the ones I really need. Because apparently, JS scripts and Java running in our browsers are taking too much RAM too! So I'll give a try on this one for some time!
Last edited by PsySc0rpi0n on 2019-06-23 11:11, edited 1 time in total.

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

#35 Post by sickpig »

Wheelerof4te wrote:
sickpig wrote:Suggesting to disable dbus proves you have no idea what you're talking about. Please refrain from advising such things in the future.
where did i suggest to disable dbus?
proves u have no idea what you are reading about.

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

Re: Improve memory usage in Debian

#36 Post by Wheelerof4te »

Oh sorry, you really didn't. I am truly sorry. But you did turn it off yourself, which is a a big no-no if you want to retain some credibility.
i tried turning it off but my login crashes and i automatically re-login. So i wouldn't touch that.

User avatar
Hallvor
Posts: 1190
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 4 times
Been thanked: 2 times

Re: Improve memory usage in Debian

#37 Post by Hallvor »

PsySc0rpi0n wrote:
sickpig wrote:no no yes of course they are, am not saying all of them are useless, I meant research which ones can be safely turned off.
There are plenty of guides out there detailing which can be safely turned off.

edit
from the ones u listed i safely turned of gnome-keyring-deamon and it has not interrupted my work flow but i m not using a DE as such so my use case might not be applicable to you. dbus is a dependency for systemd, i tried turning it off but my login crashes and i automatically re-login. So i wouldn't touch that.
'systemd', 'kded4', of course you would need.

If in doubt leave it on.

I have no idea of what apps I could possibly stop. There are so many there. I would have to search each one and try to check if they are critical or not.
Although I'm not using Gnome, there are still some apps there with the name Gnome on it like gnome-keyring-eamon. I also have gpg-agent, so I'm not sure I can remove gnome-keyring-deamon.
Just leave them. The effect on RAM usage is negligible.

Edit: Use KDE applications for KDE, if you can. They will use a lot of shared memory, making very efficient use of resources.
Last edited by Hallvor on 2019-06-23 11:15, edited 1 time in total.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

#38 Post by sickpig »

Hallvor wrote:I don't get this obsession of low memory usage on an empty desktop. It really doesn't matter at all, unless you like to stare at it, doing nothing. What matters, if RAM is so precious that you pay for it without wanting to use it, is how much RAM is being used when running the applications you use for your daily tasks.
I agree, I have this OCD for having the lowest possible RAM after boot without sacrificing utility. Also, I strive for fastest boot possible. I mean i know few seconds here and there is not going to change much but just another obsession.

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

#39 Post by sickpig »

Wheelerof4te wrote:But you did turn it off yourself, which is a a big no-no if you want to retain some credibility.
hahaha i have broken my system many times by thinking ohh this looks imp can i turn it off? thats how i learn, by failing and then recovering not ashamed to admit it :)

User avatar
PsySc0rpi0n
Posts: 262
Joined: 2012-10-24 13:54
Location: Portugal

Re: Improve memory usage in Debian

#40 Post by PsySc0rpi0n »

Yeah, me too. I failed too many times, but somehow I don't know why, my learning curve is very very flat! I use Debian for at least 8 years and there are tons of things I can't do on my own.

Anyway, I'll focus on manage the number of tabs open and the scripts running. I'll try to stop a couple of application from starting at boot such as teamviewer which I don't need at all as I use AnyDesk instead!

theblueplll
Posts: 154
Joined: 2019-04-29 01:17

Re: Improve memory usage in Debian

#41 Post by theblueplll »

Hallvor wrote:
sickpig wrote:looks beautiful and sleek for sure
but anything which uses above 100mb RAM after boot scares me off
I don't get this obsession of low memory usage on an empty desktop. It really doesn't matter at all, unless you like to stare at it, doing nothing. What matters, if RAM is so precious that you pay for it without wanting to use it, is how much RAM is being used when running the applications you use for your daily tasks.
You have a point but I have an older machine with only 4gb of ram and it helps to be at least a little conscious of it.

I did actually notice I had a problem with a lot of cpu usage with kde even with minimal apps running.
So I am testing out Mate which uses a little more ram to start with but doesn't cracnk on my cpu so badly.

User avatar
GarryRicketson
Posts: 5872
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Improve memory usage in Debian

#42 Post by GarryRicketson »

You have a point but I have an older machine with only 4gb of ram
I never can understand why people need so much ram, My host machine, only has 2gb, and it is all ways more then enough, on this VM, Debian Buster, using Dillo Browser, 4 tabs open,... 106 mb, I have 963mb and it is more then enough.
Image
Last edited by GarryRicketson on 2019-06-25 02:12, edited 1 time in total.

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

#43 Post by sickpig »

theblueplll wrote:You have a point but I have an older machine with only 4gb of ram and it helps to be at least a little conscious of it.

I did actually notice I had a problem with a lot of cpu usage with kde even with minimal apps running.
So I am testing out Mate which uses a little more ram to start with but doesn't cracnk on my cpu so badly.
TDE as DE is also quite frugal with RAM and CPU usage. When I used it 6 months ago with Debian 9.6 it used less than 220 mb RAM with zero cpu usage on idle after boot. I suppose it is in official repos.
The bottom panel can have stability issues but DE as a whole is quite smooth. I believe it is one of the most resource friendly DEs.

User avatar
Hallvor
Posts: 1190
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 4 times
Been thanked: 2 times

Re: Improve memory usage in Debian

#44 Post by Hallvor »

theblueplll wrote:
Hallvor wrote:
sickpig wrote:looks beautiful and sleek for sure
but anything which uses above 100mb RAM after boot scares me off
I don't get this obsession of low memory usage on an empty desktop. It really doesn't matter at all, unless you like to stare at it, doing nothing. What matters, if RAM is so precious that you pay for it without wanting to use it, is how much RAM is being used when running the applications you use for your daily tasks.
You have a point but I have an older machine with only 4gb of ram and it helps to be at least a little conscious of it.

I did actually notice I had a problem with a lot of cpu usage with kde even with minimal apps running.
So I am testing out Mate which uses a little more ram to start with but doesn't cracnk on my cpu so badly.
What process was using CPU? On an older computer, I would turn compositing and visual effects down to a minimum. KDE is not that heavy.

https://www.reddit.com/r/linux/comments ... n_updated/

If you want something lighter, try TDE, like sickpig suggested. It should be about as light as LXDE, but with roughly as many options as KDE plasma. I have it on a 2011 netbook with 2 GB of RAM and a horrible processor. It will fly on your system.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

User avatar
Hallvor
Posts: 1190
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 4 times
Been thanked: 2 times

Re: Improve memory usage in Debian

#45 Post by Hallvor »

sickpig wrote:
theblueplll wrote:You have a point but I have an older machine with only 4gb of ram and it helps to be at least a little conscious of it.

I did actually notice I had a problem with a lot of cpu usage with kde even with minimal apps running.
So I am testing out Mate which uses a little more ram to start with but doesn't cracnk on my cpu so badly.
TDE as DE is also quite frugal with RAM and CPU usage. When I used it 6 months ago with Debian 9.6 it used less than 220 mb RAM with zero cpu usage on idle after boot. I suppose it is in official repos.
The bottom panel can have stability issues but DE as a whole is quite smooth. I believe it is one of the most resource friendly DEs.
No, it is not in the official repositories, but it has its own Debian reposisitory:

https://wiki.trinitydesktop.org/DebianInstall

I have never had problems with the lower panel, but then I haven't tinkered with it much.

Yes, you are right. It is light on boot, but once you start running TDE applications on top of it, the light resource usage is very impressive.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

User avatar
PsySc0rpi0n
Posts: 262
Joined: 2012-10-24 13:54
Location: Portugal

Re: Improve memory usage in Debian

#46 Post by PsySc0rpi0n »

Hallvor wrote:
sickpig wrote:looks beautiful and sleek for sure
but anything which uses above 100mb RAM after boot scares me off
I don't get this obsession of low memory usage on an empty desktop. It really doesn't matter at all, unless you like to stare at it, doing nothing. What matters, if RAM is so precious that you pay for it without wanting to use it, is how much RAM is being used when running the applications you use for your daily tasks.
It's not that the point. I on't want to have 16Gb of RAM and force my OS and apps to use as low memory as possible. It becomes an issue when you're pretty much sure that your OS and apps are using too much memory without reason. Like when something is wrong!
I don't mind to have 15 tabs open on chrome, using Atom (text editor), Gimp while I listen to music with VLC and speaking to people on Discord, Telegram and Skpe and RAM is at 95% or more... That's reasonable. What it is not reasonable is when you have only the same 15 tabs open and not much more and you have like 85% or 90% of RAM used. That's not reasonable to me and probably something is wrong. Some hanged up app or some process using too much CPU and/or RAM without you knowing!

User avatar
Hallvor
Posts: 1190
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 4 times
Been thanked: 2 times

Re: Improve memory usage in Debian

#47 Post by Hallvor »

My post was not directed at you.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

User avatar
oswaldkelso
Posts: 1306
Joined: 2005-07-26 23:20
Location: UK
Been thanked: 1 time

Re: Improve memory usage in Debian

#48 Post by oswaldkelso »

PsySc0rpi0n wrote:
Hallvor wrote:
sickpig wrote:looks beautiful and sleek for sure
but anything which uses above 100mb RAM after boot scares me off
I don't get this obsession of low memory usage on an empty desktop. It really doesn't matter at all, unless you like to stare at it, doing nothing. What matters, if RAM is so precious that you pay for it without wanting to use it, is how much RAM is being used when running the applications you use for your daily tasks.
It's not that the point. I on't want to have 16Gb of RAM and force my OS and apps to use as low memory as possible. It becomes an issue when you're pretty much sure that your OS and apps are using too much memory without reason. Like when something is wrong!
I don't mind to have 15 tabs open on chrome, using Atom (text editor), Gimp while I listen to music with VLC and speaking to people on Discord, Telegram and Skpe and RAM is at 95% or more... That's reasonable. What it is not reasonable is when you have only the same 15 tabs open and not much more and you have like 85% or 90% of RAM used. That's not reasonable to me and probably something is wrong. Some hanged up app or some process using too much CPU and/or RAM without you knowing!
On this system I have 3GB of memory. I don't run the same applications or Debian but a similar load as you. 26 tabs in the browser, MPV playing a film inkscape and gimp with files open, transmission, Rox, pidgin, 2 libre-office files open a doc and a spreadsheet, wicd and mail, tor, and chat.

3.6 MiB + 1.1 MiB = 4.7 MiB tint2 (2)
4.0 MiB + 865.5 KiB = 4.9 MiB notification-daemon
4.9 MiB + 467.0 KiB = 5.3 MiB wicd
5.9 MiB + 1.3 MiB = 7.3 MiB transmission-gtk
7.0 MiB + 879.5 KiB = 7.9 MiB ROX-Filer
8.0 MiB + 471.5 KiB = 8.5 MiB bash (3)
7.2 MiB + 1.4 MiB = 8.6 MiB leafpad (2)
10.7 MiB + 1.6 MiB = 12.3 MiB wicd-client
12.5 MiB + 73.5 KiB = 12.5 MiB nscd
13.1 MiB + 1.4 MiB = 14.5 MiB pidgin
14.7 MiB + 1.6 MiB = 16.3 MiB claws-mail
21.6 MiB + 3.3 MiB = 24.9 MiB mumble
37.2 MiB + 361.0 KiB = 37.5 MiB tor
16.9 MiB + 29.4 MiB = 46.3 MiB Xorg
52.4 MiB + 1.8 MiB = 54.2 MiB mpv
72.9 MiB + 1.8 MiB = 74.7 MiB inkscape
82.2 MiB + 1.3 MiB = 83.5 MiB soffice.bin
237.2 MiB + 1.6 MiB = 238.8 MiB gimp-2.6
680.1 MiB + 26.3 MiB = 706.5 MiB seamonkey
---------------------------------
1.4 GiB
=================================
bash-4.3#

Now my system is old and 32bit but I would expect you to be able to run the same with 64bit applications with newer versions with 3gb of ram. If not you must be running some serious bugs or bloat somewhere. Having 16 gb of ram to run those application is obscene even allowing for "you have it I'll use it." of the kernel.

Maybe you need to review your software choice and buy a samsung nc 10. That will make you think about what effects your performance. in a way that improves it. Then when you run that system with 16gb of ram it will friggin fly

All software has a bang for buck ratio.. Some are worth the hit others deserve to die
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

#49 Post by sickpig »

oswaldkelso, i dont suppose u r running a DE
or electron apps(the worse RAM magnets)

no doubt something is wrong in OP's kde system, the question is what?

16gb RAM is such a luxury, i have 3 laptops their combined total does not equal 16gb RAM

User avatar
Hallvor
Posts: 1190
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 4 times
Been thanked: 2 times

Re: Improve memory usage in Debian

#50 Post by Hallvor »

It is not that hard to identify the culprit. I'll suggest the OP runs all his usual suspects and monitor their resource usage closely. Once the culprit(s) is/are found, uninstall them and look for options.
Lenovo ThinkPad T440S, Intel Core i7-4600U CPU @ 2.10GHz, 8 GB RAM, 256 GB SSD, Debian Bullseye (KDE)
Lenovo ThinkPad X240, Intel Core i5-4300U CPU @ 2.90GHz, 8 GB RAM, 120 GB SSD, Debian Bullseye (KDE)

Post Reply