0

I have 8 GB RAM in my system, which I use for many things, but the important here is gaming. I have often ran out of memory, which obviously is not a good thing, and often hard to avoid (Programs don't slow down or anything, they run on full speed until suddenly everything freezes and the programs I am using, crash before I can save)

So I started looking into things a bit. Of course I can't kill the processes I am planning to use, but is it normal for ubuntu itself, when running no additional software, to take almost 2GB RAM? And is it possible to reduce this memory usage without breaking any programs I might want to run?

Here is how much the system takes without anything visible running on it

shinare@athena-laptop:~$ free
              total        used        free      shared  buff/cache   available
Mem:        7811360     1890248     3596620      615892     2324492     5041968
Swap:       1003516           0     1003516
  • What desktop environment you you have? On GNOME it is normal to have a fresh started system take up to about 1,7 GiB RAM. – Videonauth Mar 31 '19 at 14:05
  • Ubuntu normally uses all your RAM as cache for programs you may return to and only releases that memory when space needed for new program. Difference between Details screen on RAM and free command http://askubuntu.com/questions/743649/new-16gb-of-ram-installed-yet-i-see-15-3-on-my-system-why?noredirect=1#comment1106622_743649 & https://askubuntu.com/questions/184217/why-most-people-recommend-to-reduce-swappiness-to-10-20/184221#184221 Open top in another terminal and see if you can catch it just before it crashes and what program is consuming all the RAM, maybe keep system monitor running. – oldfred Mar 31 '19 at 14:06
  • RAM not used is RAM wasted. – Rinzwind Mar 31 '19 at 14:13
  • My desktop environment is Unity. I am aware that 1.7 GiB is not totally absurd amount for operating system, but I would assume it is possible to reduce the RAM usage by killing some unnecessary processes or something? – Shinare Mar 31 '19 at 14:15
  • 1
    If you want to reduce memory usage fairly easily, you can try out Xubuntu (sudo apt install xubuntu-desktop, log out, choose Xubuntu in the desktop choices menu) or Lubuntu (sudo apt install lubuntu-desktop, log out, choose Lubuntu in the desktop choices menu). They both use less than a gigabyte for the OS and desktop. They look a bit different, but both have access to all the same programs and are supported here on Ask Ubuntu. – Chai T. Rex Mar 31 '19 at 14:22
  • Current versions of standard Ubuntu run several snaps, and they use a considerable amount of RAM. If you really want to test Lubuntu and Xubuntu (and compare to standard Ubuntu), it is a good idea to run separate instances (not Lubuntu Desktop or Xubuntu Desktop on top of Ubuntu). You can try them live (booted from a USB pendrive), and if you like one of them, install it (replacing standard Ubuntu or alongside standard Ubuntu in a separate partition). – sudodus Mar 31 '19 at 14:44
  • I like the look of Unity and GNOME a lot more than DEs like xubuntu or lubuntu. But I guess it's performance or looks, can't be both. Or I could switch to lighter DE when I am going to use the computer more heavily – Shinare Mar 31 '19 at 14:45
  • Yes, there is a cost for the bells and whistles ;-) You can boot into different operating systems depending on what you intend to do. – sudodus Mar 31 '19 at 14:46
  • You could add a little more swap space, and possibly tweak vm.swappiness parameter to tune your system so it won't freeze on you. Lets see sysctl vm.swappiness. – heynnema Mar 31 '19 at 15:04
  • The command says swappiness is 60. Also how do I add swap space without risking my data? – Shinare Mar 31 '19 at 15:21
  • There are a few questions about how to make swap space on the site, best if you have enough HDD/SSD space you could do is creating a swap file instead of partitioning. – Videonauth Mar 31 '19 at 15:25
  • When replying to comments, try and begin your reply with @heynnema (as an example) so the person will get notified, otherwise they'll probably miss your comment. Set your swap for 2-3G, or use a /swapfile. Your swap partition may already be large enough to hold that size swap. Check this web site for the procedure to resize what you have now. Your data won't be effected... but, of course... it's always good to have a recent backup :-) – heynnema Mar 31 '19 at 15:36
  • Remember, if you resize your existing swap, or move to a /swapfile, that /etc/fstab will probably need to be edited. – heynnema Mar 31 '19 at 15:44

0 Answers0