N
N
Nicholas Lindemann2016-02-08 15:00:39
linux
Nicholas Lindemann, 2016-02-08 15:00:39

How to properly configure RAM consumption in Ubuntu?

My laptop has 6 Gb RAM and the same amount of SWAP (Ubuntu 14.04), and consumes almost all the memory. Even so, I don’t feel sorry for it, and by and large it won’t even bother me, but at the same time it manages to slow down and further work on a laptop is simply unbearable. After closing all applications and windows, the memory is filled with 2.5 GB, although when I load it, I have ~ 600-800 MB. I know that the system likes to cache everything, so I found a script on the Internet (it is in the insert) supposedly to free memory. Why supposedly? Yes, because it writes that the memory has been freed, although there are no changes observed in the system monitor, and the system continues to sit further. I control resources through the "htop" utility, sometimes the memory boldly swallows "compiz", and sometimes some browser (chrome or firefox). Development environments from JetBrains work fine for me, and after work they completely give up memory. I started looking for optimization methods, set myself "preload", made it possible to use SWAP with 90% full RAM, as well as everything to a minimum in the settings, such as any effects and transitions in the OS, etc. It didn’t help either, and recently the system has been eating memory very hard, and the only salvation is to use the functionality to a minimum and periodically reboot the OS. This prospect pleases me, and I would like to find a reasonable solution to this misunderstanding. Advise who knows what, and who and how fought this, and who has achievements in this! as well as everything to a minimum in the settings, such as any effects and transitions in the OS, etc. It didn’t help either, and recently the system has been eating memory very hard, and the only salvation is to use the functionality to a minimum and periodically reboot the OS. This prospect pleases me, and I would like to find a reasonable solution to this misunderstanding. Advise who knows what, and who and how fought this, and who has achievements in this! as well as everything to a minimum in the settings, such as any effects and transitions in the OS, etc. It didn’t help either, and recently the system has been eating memory very hard, and the only salvation is to use the functionality to a minimum and periodically reboot the OS. This prospect pleases me, and I would like to find a reasonable solution to this misunderstanding. Advise who knows what, and who and how fought this, and who has achievements in this!

#!/bin/sh
echo "Было занято в кеше ОЗУ"
free
# Чистим pagecache:
sync
echo 1 | sudo tee -a /proc/sys/vm/drop_caches
#Чистим dentrie и inode кэши:
sync
echo 2 | sudo tee -a /proc/sys/vm/drop_caches
#Чистим pagecache, dentrie и inode кэши:
sync
echo 3 | sudo tee -a /proc/sys/vm/drop_caches
echo "Стало свободно в ОЗУ"
free
exit 0

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
Jacob E, 2016-02-08
@Zifix

www.linuxatemyram.com

A
ADRian, 2016-02-09
@ADR

these are not solutions but will increase the time between restarts:
sudo apt-get install zram-config
creates SWAP in a zip archive and stores it in RAM
i.e. instead of swapping on the HDD, it goes first in a compressed form in RAM

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question