View previous topic :: View next topic |
Author |
Message |
LittleBug Tux's lil' helper


Joined: 30 Mar 2005 Posts: 148 Location: 45°51'31.28"N, 12°15'11.73"E
|
Posted: Fri Jan 23, 2009 10:05 am Post subject: It's possible to free memory? |
|
|
Hi @ all!
Some time ago my 1GB RAM stick says me "So long and thanks for all the fish!" then die. From that I limited to use only 512MB !
Well! this is not a huge problem but when I launch emerge or heavyweight application, of course, free memory go down and when the program are closed free memory doesn't rise. After a while if I launch any other program system goning to swap and this is not very good!
My question is: "Is it possible to get out garbage that stay in RAM without any pourpose?"
Thanks! |
|
Back to top |
|
 |
slackline Veteran


Joined: 01 Apr 2005 Posts: 1477 Location: /uk/sheffield
|
Posted: Fri Jan 23, 2009 11:46 am Post subject: |
|
|
My understanding is that the kernel will free up memory when its requested unless its actually being used.
Thus when you close your heavy-weight application and it appears as though the memory isn't free you will find that if you start another heavy-weight application that requires the memory it will be available.
Memory is cheap, so grab some and get back to your previous levels (or even upgrade higher!). _________________ "Science is what we understand well enough to explain to a computer. Art is everything else we do." - Donald Knuth |
|
Back to top |
|
 |
cach0rr0 Bodhisattva


Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Fri Jan 23, 2009 2:11 pm Post subject: Re: It's possible to free memory? |
|
|
LittleBug wrote: | when the program are closed free memory doesn't rise
|
that's cached. as mentioned above, the kernel will free up cache as needed when other applications request it.
If indeed you're seeing a fair bit of swap used, you're quite simply running out of memory.
If you really really really wan't to free up the cache:
Code: |
echo 3 /proc/sys/vm/drop_caches
|
but i dont think that'll help - i think youre genuinely running out of memory |
|
Back to top |
|
 |
AllenJB Veteran


Joined: 02 Sep 2005 Posts: 1285
|
Posted: Fri Jan 23, 2009 3:29 pm Post subject: |
|
|
You generally shouldn't need to worry about memory management at all.
A quick tutorial on reading free memory. Run "free", and you'll see something like the following output.
Code: |
total used free shared buffers cached
Mem: 2060008 999632 1060376 0 339304 177132
-/+ buffers/cache: 483196 1576812
Swap: 1502068 156 1501912
|
The actual free memory here is that on the second line. The rest is used for buffers/caches which speed up operation and are freed as applications require the memory. |
|
Back to top |
|
 |
iarwain Apprentice


Joined: 25 Sep 2003 Posts: 253
|
Posted: Sat Jan 24, 2009 8:40 am Post subject: Re: It's possible to free memory? |
|
|
cach0rr0 wrote: |
Code: |
echo 3 /proc/sys/vm/drop_caches
|
|
You probably mean:
Code: |
echo 3 > /proc/sys/vm/drop_caches
|
|
|
Back to top |
|
 |
LittleBug Tux's lil' helper


Joined: 30 Mar 2005 Posts: 148 Location: 45°51'31.28"N, 12°15'11.73"E
|
Posted: Mon Jan 26, 2009 4:54 pm Post subject: |
|
|
Hi there, sorry for late but I had some connection problems!
Mmm ok you says that I shouldn't worry about free memory. I like Linux kernel a little more now!
Thanks for replies! |
|
Back to top |
|
 |
i92guboj Bodhisattva


Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Mon Jan 26, 2009 5:20 pm Post subject: |
|
|
Yes. There's nothing living resident on your ram after running emerge or whatever.
It's just cached memory, which essentially is the same than free memory. You just need to learn how to read the top/free output. If you really hit swap intensively then the reason is straight: you either need to choose lighter programs or heavier hardware. :p |
|
Back to top |
|
 |
LittleBug Tux's lil' helper


Joined: 30 Mar 2005 Posts: 148 Location: 45°51'31.28"N, 12°15'11.73"E
|
Posted: Tue Jan 27, 2009 11:19 am Post subject: |
|
|
I'm thinking to use BadRam patch into kernel with the hope my old 1GB ram are not too bad....
What do you think about? |
|
Back to top |
|
 |
i92guboj Bodhisattva


Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Tue Jan 27, 2009 5:31 pm Post subject: |
|
|
I know some people that uses this patch without problems. However the results are always dependent on the concrete hardware and the kind of damage. It's worth trying. If you experience instability or random crashes you can always take the bad module out again. |
|
Back to top |
|
 |
jcat Veteran


Joined: 26 May 2006 Posts: 1337
|
Posted: Tue Jan 27, 2009 6:44 pm Post subject: |
|
|
I know it's all relative, but RAM is so cheap now, it rather than mess around with strange patches, I would just by some more
Cheers,
Just
Last edited by jcat on Fri Apr 10, 2009 8:59 pm; edited 1 time in total |
|
Back to top |
|
 |
LittleBug Tux's lil' helper


Joined: 30 Mar 2005 Posts: 148 Location: 45°51'31.28"N, 12°15'11.73"E
|
Posted: Tue Jan 27, 2009 7:10 pm Post subject: |
|
|
Yeah! I know, RAM isn't expensive BUT mine, is an old system and DDR is more expensive than DDR2, (here in Italy, Stupid Italy) AND I suppose that my old 1GB RAM stick isn't totally screwed up (I hope); than as long as (the patch for) linux kernel (eheh linux rulez) give me this opportunity, why waste it?  |
|
Back to top |
|
 |
|