3

I have an Ubuntu laptop with 16GB of physical RAM. However most of the time only 4.5GB are utilized. Are there any configurations I can make to allow or encourage the system to consume more RAM seeing as that should be a good thing?

Any input is much appreciated.

Thanks in advance!

n00b
  • 131
  • You can move some partitions like /tmp to ram. That's all you can do. – Pilot6 Aug 10 '15 at 12:51
  • I recall reading about a system setting called "swapiness" in some Debian-based Linux distros; I'm not certain it's defined in Ubuntu, and I don't recall how to change it (and I'm at work on a Windows machine at present). Effectively, swapiness affects how eager the OS is to load code and data from RAM to /swap -- setting with 16 GB RAM, you might be able to set it all the way to zero, or turn off swap entirely. – Zeiss Ikon Aug 10 '15 at 12:54

2 Answers2

1

You can not get Ubuntu use more RAM that it is needed for the system and applications. Actually you do not need so much RAM, unless you use virtual machines or some specific applications.

You can utilize your RAM to create temporary partitions. That may speed up your system.

Look at this answer for guides.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
0

I would have to add that this is all strangely lacking advice. Of course you can change your system to use more of the available RAM. You can start by trying a tool like log2ram which has a lot of the basic essentials required for using RAM as storage in debian-based linux systems. You can put the entire /var/log into RAM to begin with, and you can choose to allow it to swap back to disk or be volatile and disappear at shutdown/reboot. Likewise you can put folders/dirs like your browser-profiles (firefox, brave) into RAM, making them blazing fast. In fact, depending on how much free RAM you have, you could consider creating a separate directory to be set in log2ram that has only portable apps in it. Most of them, like browsers, will run way faster from RAM. In addition to tools like log2ram, if you use apps that use databases, like SQlite, MySQL or Mariadb, you should check each of their configs for using more RAM, or find out where their db's are stored on disk, and put those storage locations in RAM. Most database servers have specific options for using more RAM, and through that apps that make use of them run way faster.

Julius
  • 165