LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 11-16-2012, 01:43 AM   #1
rivera
LQ Newbie
 
Registered: Nov 2012
Posts: 4

Rep: Reputation: Disabled
How to clean computer memory space?


Some times I stop a running program when calculation results start to diverge. But the free memory goes on decreasing with increasing number of program terminations. I do not have reboot authority to clean the occupied cashed memory. Is there some way so that I can increse the free memory space?
 
Old 11-16-2012, 01:56 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Quote:
Originally Posted by rivera View Post
Some times I stop a running program when calculation results start to diverge. But the free memory goes on decreasing with increasing number of program terminations. I do not have reboot authority to clean the occupied cashed memory. Is there some way so that I can increse the free memory space?
Is there a valid reason why you want to do this by hand?

Linux memory management works rather well. Cached memory is being freed when needed, no need to do this by hand (although there could be exceptions).

If you really (which I doubt!!!) need to do this by hand:
Code:
sync; echo 3 > /proc/sys/vm/drop_caches
 
Old 11-16-2012, 02:39 AM   #3
rivera
LQ Newbie
 
Registered: Nov 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
Is there a valid reason why you want to do this by hand?

Linux memory management works rather well. Cached memory is being freed when needed, no need to do this by hand (although there could be exceptions).

If you really (which I doubt!!!) need to do this by hand:
Code:
sync; echo 3 > /proc/sys/vm/drop_caches
Hi Drunna,

I got the following message when I entered the commands.
-bash: /proc/sys/vm/drop_caches: Permission denied

Why I should decrease the occupied cashed memory is that cashed memory goes on increasing when running programs are terminated in the middle due to some numerical errors. This caused free memory required for computation less and less so the computation time increases. This is my experience. I donot the exact reson why inital small cashed memory goes on increasing after exitiing a running program.
 
Old 11-16-2012, 03:42 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Quote:
Originally Posted by rivera View Post
I got the following message when I entered the commands.
-bash: /proc/sys/vm/drop_caches: Permission denied
You need root privileges to execute the commands given (the permission denied message should have been an indicator). You mention not having "reboot authority", which could indicate that you cannot execute this command.

Quote:
Why I should decrease the occupied cashed memory is that cashed memory goes on increasing when running programs are terminated in the middle due to some numerical errors. This caused free memory required for computation less and less so the computation time increases. This is my experience. I donot the exact reson why inital small cashed memory goes on increasing after exitiing a running program.
Without doing some dedicated research/trouble shooting you cannot make the assumption that one is the reason for the other.
 
1 members found this post helpful.
Old 11-16-2012, 05:20 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,357
Blog Entries: 2

Rep: Reputation: 3979Reputation: 3979Reputation: 3979Reputation: 3979Reputation: 3979Reputation: 3979Reputation: 3979Reputation: 3979Reputation: 3979Reputation: 3979Reputation: 3979
If a terminated calculation does not release used memory (and I am not talking about cache) than this is a bug in the program and you should contact the developers about that.
 
1 members found this post helpful.
Old 11-16-2012, 09:56 AM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 1,337

Rep: Reputation: 573Reputation: 573Reputation: 573Reputation: 573Reputation: 573Reputation: 573
Before doing too much, you should take a look at http://www.linuxatemyram.com/.

It might save some confusion if the label on "free" memory were changed to "memory that is currently wasted because the kernel can't find anything productive to do with it". But, that's a bit much for a column heading, so we're stuck with "free". It is completely normal for the amount of "free" memory to tend toward zero as the system runs.

Now, if this program is creating files in a tmpfs and they are not being deleted, that would indeed be a problem, and one that should be easily corrected.

Last edited by rknichols; 11-16-2012 at 10:00 AM.
 
1 members found this post helpful.
Old 11-20-2012, 09:18 PM   #7
rivera
LQ Newbie
 
Registered: Nov 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by druuna View Post
You need root privileges to execute the commands given (the permission denied message should have been an indicator). You mention not having "reboot authority", which could indicate that you cannot execute this command.

Without doing some dedicated research/trouble shooting you cannot make the assumption that one is the reason for the other.
Thank you so much, druuna,TobiSGD,rknichols for posting great replies.

Last edited by rivera; 11-20-2012 at 09:20 PM.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
memory management of a process in kernel space and user space. embeddedlinux Linux - Newbie 1 05-08-2012 08:08 AM
clean up free some disk space fachhoch@gmail.com Linux - Newbie 5 02-13-2012 08:09 PM
Division of Logical Memory Space in to User Space and Kernel Space shreshtha Linux - Newbie 2 01-14-2010 09:59 AM
Sharing Memory between driver space and user space ian b davidson Programming 1 11-10-2008 06:35 AM
Running out of disk space... clean up possible? donv2 Linux - Newbie 3 04-19-2005 02:48 AM


All times are GMT -5. The time now is 03:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration