LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-11-2020, 12:40 PM   #1
marius09
Member
 
Registered: Mar 2019
Posts: 37

Rep: Reputation: Disabled
memory


hi,
in order to release memory i execute
echo 3 >/proc/sys/vm/drop_caches.

this mean that the kernes sees that the value of drop_caches =3 and start to free memory?
is there any other command to free more memory?
 
Old 06-11-2020, 04:47 PM   #2
obobskivich
Member
 
Registered: Jun 2020
Distribution: Xubuntu / Slackware
Posts: 68

Rep: Reputation: Disabled
Not to be snarky, but 'close some applications' would free up memory (and/or switch to lower-resource-requirement versions of applications - a 'big' example would be switching DEs from GNOME or KDE to XFCE or Blackbox). I know I've seen some applications (web browsers seem to be the worst, but I've observed this with office suites and some games too) that can take up quite a bit of memory (into the realm of a few GiB) even with 'nothing open' due to their own inner workings. Closing and restarting the browser/app and/or clearing its cache/storage can sometimes help there, but perhaps this doesn't apply to your situation (I'm admittedly guessing at your use-case here).

AFAIK - Dropping the cache doesn't really 'free' memory, from what I understand the OS can still send applications into that memory, but it otherwise uses it for caching (rather than let it sit empty/untouched) to improve performance. It shouldn't get in the way of an application needing memory. I found this website useful: https://www.linuxatemyram.com/ (if you scroll down to the bottom they also link to a second page that has some examples with the cache).
 
Old 06-12-2020, 10:35 AM   #3
marius09
Member
 
Registered: Mar 2019
Posts: 37

Original Poster
Rep: Reputation: Disabled
then is there a situation when is necessary to echo 3 >/proc/sys/vm/drop_caches?
 
Old 06-12-2020, 02:43 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,022

Rep: Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145
As I recall I read that 3 should never be used in a production machine. 1 is recommended. 3 is nuclear.
 
Old 06-12-2020, 03:06 PM   #5
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 1,418

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
I once used that for the broken Suse 10 kernel 2.6.16 to avoid oom killer during long lasting heavy i/o.
Never since.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between resident memory,shared memory and virtual memory in system monitor mathimca05 Linux - Newbie 1 11-11-2007 04:05 AM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 04:48 PM
RH 8.0 Mapping Virtual Memory to get access to VMIC Reflective Memory PCI card. Merlin53 Linux - Hardware 0 05-05-2003 12:50 PM
Memory Mapping RH8 w/VMIC Memory Merlin53 Linux - Hardware 0 05-01-2003 10:35 AM
memory stick / CF memory card reader X-dazed Linux - Newbie 1 01-21-2003 12:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration