memory usage

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
retired
Posts: 36
Joined: Sun Oct 14, 2018 7:01 pm

memory usage

#1 Post by retired »

I've got a fresh up to date MX 19 install on my Thinkpad with 2 gb memory. Right now with just this window open in Firefox I'm using 41 % memory - Is this typical ? - reason I ask is with Facebook open I use over 90 % and occasionally freeze.

bll
Posts: 29
Joined: Thu Jun 01, 2017 11:04 am

Re: memory usage

#2 Post by bll »

Open a terminal.
Type: top
Type a single > symbol (this will sort by %MEM).

The 'firefox-bin and 'Web Content' processes are all firefox.
You can see they use up quite a bit of memory (8.2% on my system with four tabs).
Within firefox, you can change your habits, close tabs a lot and re-open them when needed.

Take a look at what else has a high percentage in the %MEM column and see what
you can turn off or stop running.

Go to MX/Settings/Session and Startup/Application Autostart.
See what services and extra programs you can turn off.
(e.g. I never use the USB Unmounter, I'm turning it off).

Some processes like the MX Updater are really nice, but if you can get into the habit
of running your checks manually, memory can be saved that way.

Every little bit of memory saved helps.

With only 2GB of memory, you will want to set your system's vm.swappiness to 30 or 40.
( viewtopic.php?t=45005 )

User avatar
Stevo
Developer
Posts: 14907
Joined: Fri Dec 15, 2006 7:07 pm

Re: memory usage

#3 Post by Stevo »

MX 19 has swappiness set to 15% by default. A 32-bit version of MX should use about 20% less RAM than 64-bit, too.

Yes, especially with sites like Facebook that load who knows how much data-mining crap without you knowing, Firefox eats RAM.

Are you using a good ad blocker like Ublock Origin?

You may also want to switch to a browser like Pale Moon, which should be lighter on RAM.

There's also a program you can install from the repos called "earlyoom", which I ran across yesterday. It should kill the browser before your system slows to a near-crawl, but Firefox sets a session restore every 15 seconds unless you change that manually, so it won't hurt that much. (also recommended for many users). I haven't used it, so don't know yet if you need to configure it, or if it just works after installation.

az2020
Posts: 175
Joined: Sun Apr 28, 2019 10:36 pm

Re: memory usage

#4 Post by az2020 »

retired wrote: Fri Feb 07, 2020 7:21 pm I've got a fresh up to date MX 19 install on my Thinkpad with 2 gb memory. Right now with just this window open in Firefox I'm using 41 % memory - Is this typical ? - reason I ask is with Facebook open I use over 90 % and occasionally freeze.
Some of your 2gb is being used for dedicated graphics, right? You can open a terminal window and type "free." That will tell you how much memory is being used. Then you can start a browser, open a new tab etc., and see how the free memory changes.

I just did some distro "fast dating" (nstalled 20 distros, measured how much memory they use). MX 19 uses 410mb in a virtual box. On my actual hardware, it was 580mb (which will be different on different machines, due to different drivers. That's what it was on my Ryzen 3 3200u).

That right there would be 25% of 2gb. And then some of my memory is shared with the video, I believe. If I only had 2gb, I'd be closer to 30% used. Then the browser, and heavy sites like FB.

If you turn off MX's background image, that will save a little. I'm sure there's other things. I think I remember seeing some composter things somewhere (maybe MX Tweaks). Some distros have some window "animation" that can be turned off and use less resources.

If you really need small, AntiX is the smallest distro I measured (I didn't do Puppy. It's probably smaller.). Bodhi was the next one. Peppermint, then Linux Lite.

az2020
Posts: 175
Joined: Sun Apr 28, 2019 10:36 pm

Re: memory usage

#5 Post by az2020 »

az2020 wrote: Fri Feb 07, 2020 9:29 pm I just did some distro "fast dating" (nstalled 20 distros, measured how much memory they use). MX 19 uses 410mb in a virtual box. On my actual hardware, it was 580mb (which will be different on different machines, due to different drivers. That's what it was on my Ryzen 3 3200u).
...
If you really need small, AntiX is the smallest distro I measured (I didn't do Puppy. It's probably smaller.). Bodhi was the next one. Peppermint, then Linux Lite.
I just realized I might have sounded like I was saying MX is large. It's not, but if you have limited resources, there are smaller (and less polished) distros. It's a tradeoff that way.

So you can see for yourself, this is the data I collected:

Image
[Click for larger]

For more info, see the spreadsheet or PDF: https://jmp.sh/kNTBnT4

Between Antix/Bodhi & MX, there's not that much difference. But, if you have very low resources that could make a difference (just like Puppy could make a difference compared to Antix. I think Puppy is pretty "out there" for the extreme resource-limits. I didn't compare it.).

The "real hardware" numbers may not be representative of you computer. Mine probably uses much larger drivers than yours. It's probably better to compare the VirtualBox numbers. Installing on real hardware should be higher than that. But, probably not as high as mine (newer, more complicated features?).
Last edited by az2020 on Sat Feb 08, 2020 12:10 am, edited 1 time in total.

SwampRabbit
Posts: 3602
Joined: Tue Jun 14, 2016 2:02 pm

Re: memory usage

#6 Post by SwampRabbit »

az2020 wrote: Fri Feb 07, 2020 11:24 pm So you can see for yourself, this is the data I collected
Thank you sharing that awesome spreadsheet!
NEW USERS START HERE FAQS, MX Manual, and How to Break Your System - Don't use Ubuntu PPAs! Always post your Quick System Info (QSI) when asking for help.

retired
Posts: 36
Joined: Sun Oct 14, 2018 7:01 pm

Re: memory usage

#7 Post by retired »

OK - I would like to up my swappiness to 35 - what command should I enter in a terminal - thanks.

User avatar
junoluna
Posts: 522
Joined: Sun Sep 29, 2019 11:53 pm

Re: memory usage

#8 Post by junoluna »

retired wrote: Sun Feb 09, 2020 8:01 am OK - I would like to up my swappiness to 35 - what command should I enter in a terminal - thanks.

Code: Select all

sudo sysctl vm.swappiness=35
......

if that is good for you, you will have to make it permanent

User avatar
chrispop99
Global Moderator
Posts: 3434
Joined: Tue Jan 27, 2009 2:07 pm

Re: memory usage

#9 Post by chrispop99 »

junoluna wrote: Sun Feb 09, 2020 8:08 am
retired wrote: Sun Feb 09, 2020 8:01 am OK - I would like to up my swappiness to 35 - what command should I enter in a terminal - thanks.

Code: Select all

sudo sysctl vm.swappiness=35
......

if that is good for you, you will have to make it permanent
To make it permanent, add the following to the bottom of the file /etc/sysctl.conf as root:

Code: Select all

vm.swappiness = 35
After rebooting, you can check you have done it properly by entering this in a terminal:

Code: Select all

cat /proc/sys/vm/swappiness
FWIW, changing swappiness has less effect than might be hoped.

Chris
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines

User avatar
m_frank
Posts: 183
Joined: Tue Jun 25, 2019 12:25 pm

Re: memory usage

#10 Post by m_frank »

In MX-19, instead of modifying /etc/sysctl.conf, there is a "drop-in" in /etc/sysctl.d/:

Code: Select all

$ tree /etc/sysctl.d/
/etc/sysctl.d/
├── 99-mx_allow_non_root_dmesg.conf
├── 99-swappiness_mx.conf
├── 99-sysctl.conf -> ../sysctl.conf
├── 99-vm-dirtybytes_mx.conf
├── protect-links.conf
└── README.sysctl

Code: Select all

$ cat /etc/sysctl.d/99-swappiness_mx.conf
vm.swappiness = 15
So you need to edit /etc/sysctl.d/99-swappiness_mx.conf

For MX-18.X, you can create the /etc/sysctl.d/99-swappiness_mx.conf "drop-in", modeled on the MX-19 example.
LT: Dell 5566, Core i3-7100U, 6GB, 1.0TB HD, MX-19.1_x64/386
LT: Lenovo T500, Core2 Duo P8700, 4GB, 320GB HD, MX-19.1_x64/386
LT: HP DV6-1053cl, Core2 Duo P7450, 4GB, 320GB HD, MX-18.3_x64
DT: HP 500-281, Core i3-4130, 4GB, 1.0TB HD, MX-18.3_x64

Post Reply

Return to “MX Help”