[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Limiting Disck Cache



Ron Johnson wrote:
Operating on huge files will always cause the kind of problems
you describe.  Why?  Because when you run the cp (or dd or what-
ever) command, the OS takes and starts loading that file into
cache, while writing it out to the destination.  So what?  The
Last In, First Out algorithm used to determine what stays in
RAM and what goes in swap sees this brand new file being used
right *now*, and sees that Tomcat and Eclipse are *not* being
used now.  So, they get pushed aside, to make room for the file
that *is* being used now.

Actually, the algorithm used most commonly now is Least Recently
Used.  There is a distinction in that newer memory pages may
get swapped out if it has been longer since they were accessed.

Unfortunately, that one file takes up all of cache.  So, the next
time that you want to use Mozilla or Eclipse or whatever, it has
to be taken back out of swap, and put back in RAM.

In this case, though, the difference is not apparent.  The result
is still as you describe.

-Roberto Sanchez

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: