On Monday 14 July 2003 8:03 am, Jonathan C. wrote:
> Hi all,
>
> A few months ago I talked with some people on this list about
> excessive caching on laptop computers. We could not find a
> solution. Howevber, the title of the thread was cryptic, so I hope
> that with the new title more people will react.
>
> We noticed that that copying a file or making extensive access to the
> hard drive ate up all the memory. For instance, when I copy a 200Mo
> file from one partition to another (same physical HD), the file copies
> fine but 200Mo of RAM get eaten up in the process. The question is :
> Is this gentoo related ? Is this kernel related ? Is this hardware
> related ? I may add that this seems to be vendor independent since
> both Dell and Toshiba laptops seem to have the same problem.

Well, it's used, and it's available.

Unused ram is wasted ram. Since Linux can't possibly know when you'll use a 
disk read more than once, it uses all available spare ram to cache it. If you 
need that ram for something else, it becomes instantly available (within 
reason).

This is a Linux design issue and is perfectly normal operation.

Here's a ram snapshot from my server:

11:07am  up 41 days, 20:42,  1 user,  load average: 0.15, 0.24, 0.32
Mem:  1023108K av, 1008392K used,   14716K free,       0K shrd,   71596K buff
Swap:  610384K av,   23352K used,  587032K free                 778280K cached

As you can see, Linux maintains a small amount of free ram (around 15 meg 
here), and all other ram is used. In this case, 778M is just used as disk 
cache, which means that over the long run, my server needs about 1/4th of the 
ram that I have given it. However, this large disk cache means that many disk 
reads come from ram instead of the hard drives. On a server, this is a great 
thing.

May I suggest that you run xosview and be concerned with the area in green.

-- 

Democracy is two wolves and a lamb voting on what to have for
lunch. Liberty is a well-armed lamb contesting the vote.


--
[EMAIL PROTECTED] mailing list

Reply via email to