memory usage
memory usage
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.
Re: memory usage
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 )
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 )
Re: memory usage
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.
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.
Re: memory usage
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.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.
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.
Re: memory usage
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.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.
So you can see for yourself, this is the data I collected:
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.
-
- Posts: 3602
- Joined: Tue Jun 14, 2016 2:02 pm
Re: memory usage
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.
Re: memory usage
OK - I would like to up my swappiness to 35 - what command should I enter in a terminal - thanks.
Re: memory usage
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
- chrispop99
- Global Moderator
- Posts: 3434
- Joined: Tue Jan 27, 2009 2:07 pm
Re: memory usage
To make it permanent, add the following to the bottom of the file /etc/sysctl.conf as root:junoluna wrote: Sun Feb 09, 2020 8:08 amretired 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
Code: Select all
vm.swappiness = 35
Code: Select all
cat /proc/sys/vm/swappiness
Chris
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines
Re: memory usage
In MX-19, instead of modifying /etc/sysctl.conf, there is a "drop-in" in /etc/sysctl.d/:
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.
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
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
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