New 18.04 using 2 GB of RAM
Solution 1
But even with everything closed, the zero used session still shows 2 GB RAM consumption is system load indicator . . . I want to know whether this a normal thing or I should be worried about my hardware. Thanks.
I think this is normal because my system also has the same memory usage. I currently have nothing running and my memory use is 2.0 GB, cache 1.8 GB but I also have 4 GB of swap space (2 GB swapfile and 2 GB zram) and my swappiness is set to 10.
I use zram along with regular swap, on 4GB of RAM, with an SSD instead of a hard drive on a Toshiba laptop with an old-generation i3 processor from ~2012 and things run smoothly.
How to find out how much swap space I have ?
Use swapon
to find out how much swap space you have.
Should I increase it ? If yes, how to do that ?
I do not recommend you increase the size of your swap file but I do recommend using zram to increase your overall swap size.
Using zram will automatically add 1/2 of your RAM size to your swap size without the diminishing returns of a swapfile (HDD access is about 10³ slower then RAM access).
To increase your swap space using zram, you can run the following commands:
sudo apt update
sudo apt install zram-config
sudo systemctl enable zram-config
sudo systemctl start zram-config
To verify that zram is in use, run: swapon
and zram should be listed.
Here is an example:
~$ swapon
NAME TYPE SIZE USED PRIO
/swapfile file 2G 101.9M -2
/dev/zram0 partition 486.1M 209.3M 5
/dev/zram1 partition 486.1M 210.1M 5
/dev/zram2 partition 486.1M 208.6M 5
/dev/zram3 partition 486.1M 206.8M 5
Solution 2
The Ubuntu wiki advises that the minimum system requirements include 4 GB of RAM for Ubuntu Desktop. That would be for Ubuntu only, not taking running of applications into account.
https://help.ubuntu.com/community/Installation/SystemRequirements
What you could consider is to use a more lightweight variant of Ubuntu. That same webpage has some suggestions, listed at the bottom of the page. Alternatively, if possible, you could consider to increase the amount of RAM in your computer.
Solution 3
System memory usage and memory allocation are adjusted depending on available memory of the system on the specific hardware. Depending on many variables, the actual used memory may differ from system to system. In general as long as the system is not running out of memory, having a higher than expected memory usage is not something to worry about.
Solution 4
There's a known issue with some devices running Gnome used in Ubuntu 16.04 to 18.04 leaking RAM due to a bug with Gnome 3. You can read more about this at: https://gitlab.gnome.org/GNOME/gnome-shell/issues/64
Workstations we own have not had that issue since updating to 19.04 or test machines running 19.10.
user227495
Updated on September 18, 2022Comments
-
user227495 over 1 year
I have a 4GB RAM laptop. During last week, my system was freezing a lot. When I checked the stats, it said 2 GB or RAM and 1 GB cache is in use. The load is some 1.2 or similar. So I reinstalled 18.04 and a couple of regular programs. But even with everything closed, the zero used session still shows 2 GB RAM consumption is system load indicator. Please check the screenshot below.
I want to know whether this a normal thing or I should be worried about my hardware. Thanks.
A little background info. Before this fresh install of 18.04, I had an incomplete AMPPS install. Also Inkscape ( which I installed from PPA ) was crashing every now and then during last 2 weeks.
Update 1 :
$ swapon NAME TYPE SIZE USED PRIO /swapfile file 2G 2.5M -2
Should I increase the swap size ?
Update 2 :
Will using gnome classic DE do any good ?
-
guiverc over 4 yearsI would go into your machine's BIOS and see how much RAM it detects is available. It could be POST (power on self-test) has detected issues with a ram module and thus your hardware is ignoring it (which is done before Ubuntu boots, so changes in Ubuntu will achieve nothing). I'd also likely run memtest86() your system possibly already has installed (via grub).
-
user227495 over 4 yearsActually, both 18.04 and Windows 10 dual boot is showing 4GB RAM ( that is all laptop has ). I am worried about the 2GB consumption by 18.04 even when no program is running.
-
trond hansen over 4 yearsi have an ancient toshiba tecra 2G ram ubuntu 18.04.3.directly after startup less than 1G ram and 0%swap is used so something is stealing your memory,i have only the common extra programs installed(synaptic-stacer-bleachbit).
-
Rinzwind over 4 years
-
user227495 over 4 years@Rinzwind should I increase the swap size ?
-
mchid over 4 years@user227495 It doesn't look like you are using much swap space so increasing space may not help. Changing your swappiness (which is not the same as your swap size) may help or it might slow things down (don't always believe that using lower swappiness will speed things up because it may slow things down in the long run). If you want help regarding swappiness, then include the output from the following command in your question:
cat /proc/sys/vm/swappiness
. -
mchid over 4 years@user227495 However, the answer for the linked question says to add zram to your setup. I use zram along with regular swap, on 4GB of RAM, with an SSD instead of a hard drive on a toshiba laptop from ~2012 and things run fast. However, I currently have nothing running and my memory use is 2.0 GB, cache 1.8 GB but I also have 4GB of swap space.
-
Thomas Ward over 4 yearsAlso keep in mind your "cache" size, that's 'reserved' by the OS but not actually in use. And 897MB of the 1.8GB is cache space that'll be released as needed to the rest of the system as needed (so 1.0GB of RAM is in use, which is not atypical for a GUI of Ubuntu 18.04 because it's GNOME and needs more resources)
-
vanadium over 4 yearsThat you only see 2 GB rather than the installed 4 would lead me to expect a hardware problem.
-
-
user227495 over 4 yearsThings were a bit better with Cinnamon. Which DE is Lubuntu ? I am ok with a light DE. Thanks. Upvoted.
-
mchid over 4 yearsNote that not all SSDs are the same as some are faster than others so it is best to compare the advertised specs.
-
Melebius over 4 years“That would be for Ubuntu only, not taking running of applications into account.” Are you sure? I thought it should reckon the applications included in a standard OS installation, like Firefox, LibreOffice, etc.
-
Thomas Ward over 4 years@Melebius it does not take into account the heavy RAM usage of other applications beyond the 'typical' one or two Firefox tabs and maybe some open applications. For heavier uses, et. 4GB is the minimum whereas I'd recommend twice that for regular use stuff because of known GNOME memleaks
-
oldfred over 4 yearsKernel caches programs in RAM as you may reuse them. Linux ate my RAM! - memory use cache linuxatemyram.com Difference between Details screen on RAM and free command askubuntu.com/questions/743649/… & askubuntu.com/questions/184217/…
-
Hermann over 4 yearsTo add a data-point: I am using old laptops with only 2 GB RAM or less just fine. With lightdm and XFCE as configured in Xubuntu, you can have a system which uses less than 0.5 GB RAM while idle.
-
user227495 over 4 yearsHow to find out how much swap space I have ? Should I increase it ? If yes, how to do that ? Thanks.
-
mchid over 4 years@user227495 According to your
swapon
command, it looks like you have a 2 GB swapfile. Upon further investigation, I found out that I have a 2 GB swap file but I also have ~2 GB zram swap which totals ~4 GB. Adding zram should increase your swap space. -
mchid over 4 years@user227495 According to the Ubuntu help docs your swapfile size only needs to be the square root of your RAM size.