LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux and memory (https://www.linuxquestions.org/questions/linux-newbie-8/linux-and-memory-166036/)

DiscoKenny 04-04-2004 08:07 AM

linux and memory
 
Dell 450 P3, 512 Ram - Fedora Core 1

When I look at System Tools - Info Center - Memory, I notice that I have plenty of available RAM after a reboot, but as I use apps and close them, the memory doesn't seem to be released.

Is this what I should expect? I have not run into any performance problems, I'm just curious. I noticed that when I open a new app, the non-disk memory gets taken up immediately, so I assumed that when I close the app, the memory would be released as well.

Just curious...

meonkeys 04-04-2004 10:46 AM

Short answer: Yes, this is what you should expect, IF you're talking about what most applications refer to as "free memory", which doesn't include free memory available for buffers and cache.

Notice that when you run a program the second time, it runs much faster. Try this with something heavyweight like Openoffice.org or Mozilla Firefox. The speedup should be quite noticeable if you have
  • a "fast" computer (at least 400MHz)
  • plenty of RAM (at least 128Mb)
  • just rebooted

This is because Linux fills all available memory with cached data because it's slower to read from disk than to fetch out of RAM[/URL].

To see how much memory is "really" available, I use the command 'free -m'.

Code:

$ free -m
            total      used      free    shared    buffers    cached
Mem:          249        241          7          0        16        110
-/+ buffers/cache:        113        135
Swap:          823        70        752

A quick glance at free buffers/cache shows that I have about 135Mb available. If I fill this up (by starting a bunch more programs, for instance), that number will drop to zero, and Linux will start using the swap file.

Hope this helps,
-Adam


If this helped you, please take the time to rate the value of this post:
http://rate.affero.net/meonkeys/

InspectorClusea 04-04-2004 03:55 PM

Free memory disappearing act
 
Nice explanation, but something doesn't smell right. When I was using the 2.4.x kernel I rarely if ever used swap. Now with the 2.6.x kernel, I go into swap all the time. Something has changed for the worse.

:mad:

meonkeys 04-04-2004 05:51 PM

:confused:

InspectorClusea, that's unfortunate that your box uses more swap with the 2.6 kernel. However, your comment may be irrelevant... DiscoKenny is talking about Fedora Core 1 (and you seem to be running Mandrake 10) and DiscoKenny said he had no performance problems in the first post of this thread.

Please start a new thread to elucidate your dilemma. It would be helpful to include information like processor speed/type, amount of RAM installed, size of swap, etc.


All times are GMT -5. The time now is 04:41 PM.