Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Improve memory usage in Debian

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: Improve memory usage in Debian

#21 Post by sickpig »

u using opera presto or current opera?
also RAM usage per tab is site dependant, something like this forum site is not going to use much as opposed to auto video playing news sites
i use opera current version on Stretch and find RAM usage comparable to chrome for identical websites. Opera is after all chromium clone. Though they have added some convenient touches.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Re: Improve memory usage in Debian

#22 Post by Hallvor »

theblueplll wrote: Not sure where you get this from.

Gnome on my machine uses over 1gb of ram on startup and never lets go of ram when I close programs

KDE uses 350mb
One thing that helps KDE is to not install all the bloat but even when I had all that it used very little ram.

So the op has something going on or expects to have way too much running all at once.

LXDE is ok if you want your machine too look like it is 2002.
Yes, KDE is efficient, especially when running KDE applications.

Compositing on, two plasmoids, Konsole, KSysGuard and Falkon web browser with adblock and 20 open and used tabs (https://kde.org/): 2GiB.

It is not a resource hog at all.
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

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

Re: Improve memory usage in Debian

#23 Post by sickpig »

looks beautiful and sleek for sure
but anything which uses above 100mb RAM after boot scares me off

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Improve memory usage in Debian

#24 Post by Head_on_a_Stick »

PsySc0rpi0n wrote:

Code: Select all

  2.3 GiB + 143.6 MiB =   2.4 GiB       chromium (28)
:shock:

Use firefox-esr instead.
deadbang

User avatar
PsySc0rpi0n
Posts: 321
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Re: Improve memory usage in Debian

#25 Post by PsySc0rpi0n »

I don't need decrease RAM usage to close to 0MB. That's not the point. I'm just trying to find reasoning behind so huge amount of used RAM.

I'm not sure if the add-ons I removed played main role or if it was the 15 tabs open. I would bet more in the tabs open, though.

@sickpig, what kind of autostart apps are you talking about?

Most of my open tabs are forums, and random sites where I read stuff to complement commands man pages that many times I cannot understand. So I search DDG and try to see examples of commands that I need to use to complete tasks. I'm a long run Linux learner... Not sure if this is good or bad... :s

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 times

Re: Improve memory usage in Debian

#26 Post by Hallvor »

Many open tabs (and addons!) will spike your RAM usage dramatically, but it is also a matter of the web browser used. In my own experience, Chromium has used more RAM than Firefox-esr - especially with many open tabs.

Try the following tip to reduce memory usage in Firefox (and reduce performance...):

Go to preferences. Under the tab “General”, disable the option “Use recommended performance settings” and set “Content process limit” to 2.
Disable prefetching:
Type in the URL entry field: about:config
Then: network.prefetch-next false
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

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

Re: Improve memory usage in Debian

#27 Post by sickpig »

I was referring to the below

Code: Select all

3.2 MiB + 91.5 KiB = 3.2 MiB vim.gtk [updated]
3.1 MiB + 123.5 KiB = 3.3 MiB kglobalaccel5
3.3 MiB + 54.5 KiB = 3.3 MiB libvirtd
3.6 MiB + 94.5 KiB = 3.7 MiB akonadi_birthdays_resource
3.6 MiB + 94.5 KiB = 3.7 MiB akonadi_indexing_agent
2.5 MiB + 1.3 MiB = 3.8 MiB systemd (3)
3.3 MiB + 600.5 KiB = 3.8 MiB kactivitymanagerd
3.8 MiB + 0.5 KiB = 3.8 MiB teamviewerd
2.9 MiB + 1.2 MiB = 4.1 MiB kded4
4.0 MiB + 256.5 KiB = 4.3 MiB polkit-kde-authentication-agent-1
2.8 MiB + 1.7 MiB = 4.5 MiB kdeinit4 (2)
4.5 MiB + 108.5 KiB = 4.6 MiB tracker-store
4.5 MiB + 462.5 KiB = 5.0 MiB hp-systray
4.8 MiB + 365.5 KiB = 5.2 MiB akonadi_sendlater_agent
5.1 MiB + 267.5 KiB = 5.4 MiB freshclam
5.3 MiB + 70.0 KiB = 5.4 MiB gnome-keyring-daemon (2)
5.1 MiB + 389.0 KiB = 5.5 MiB dbus-daemon [updated] (4)
5.7 MiB + 1.0 MiB = 6.7 MiB bash (5)
5.3 MiB + 1.5 MiB = 6.8 MiB pulseaudio
7.6 MiB + 883.5 KiB = 8.4 MiB org_kde_powerdevil
8.4 MiB + 551.5 KiB = 9.0 MiB krunner
9.5 MiB + 138.5 KiB = 9.6 MiB NetworkManager
9.5 MiB + 326.5 KiB = 9.8 MiB MusicManager
12.8 MiB + 642.5 KiB = 13.4 MiB ksmserver
12.6 MiB + 915.5 KiB = 13.5 MiB rtorrent main
12.7 MiB + 1.9 MiB = 14.6 MiB kdeinit5 (2)
16.9 MiB + 71.5 KiB = 17.0 MiB akonadiserver
9.6 MiB + 7.9 MiB = 17.5 MiB apache2 (6)
19.3 MiB + 125.5 KiB = 19.4 MiB irssi
26.0 MiB + 16.5 KiB = 26.0 MiB prx
37.6 MiB + 252.5 KiB = 37.8 MiB packagekitd
You can check which ones aren't critical or essential and disable them, will save RAM but if thats not what you are after then you could try running your browser like this

Code: Select all

/opt/google/chrome/google-chrome --disable-extensions --disable-plugins 
I dont have the binary path for chromium but you can substitute. I suppose chrome switches should work with chromium as well, and then see if it makes any difference in RAM usage?

if it still doesn't then the only options i can think of are either
1 change the browser
2 change the DE

or try the below in sysctl.conf

Code: Select all

vm.swappiness = 0
vm.vfs_cache_pressure=15
i have changed it to suit my needs. I of course dont use any swap. You will have to modify per your needs, tweak it suit your setup.

User avatar
PsySc0rpi0n
Posts: 321
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Re: Improve memory usage in Debian

#28 Post by PsySc0rpi0n »

Isn't any of those apps critical to the system? I mean not even 'systemd', 'kded4', 'dbus eamon', 'gnome-keyring-deamon', etc???
I can try to search about the others I don't know but the above ones are not critical?

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

Re: Improve memory usage in Debian

#29 Post by sickpig »

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.

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

Re: Improve memory usage in Debian

#30 Post by sickpig »

I use this https://github.com/oguzhaninan/Stacer/r ... tag/v1.1.0 for managing startup apps, services and much more. It makes system management a cinch. Used to change everything manually but this app is a lifesaver!

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
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 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.
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

User avatar
PsySc0rpi0n
Posts: 321
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

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
Global Moderator
Global Moderator
Posts: 2020
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 138 times
Been thanked: 204 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.
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

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: 321
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

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!

Post Reply