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 ?
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.
Use
swapon
to find out how much swap space you have.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:
To verify that zram is in use, run:
swapon
and zram should be listed.Here is an example:
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.
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.
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.