[RndTbl] linux not caching files very long
Gilbert E. Detillieux
gedetil at cs.umanitoba.ca
Wed Nov 21 15:34:51 CST 2012
On 2012-11-20 13:06, Trevor Cordes wrote:
> On 2012-11-20 Gilbert E. Detillieux wrote:
>> I wouldn't be so sure about that, unless you've really checked that
>> closely, and/or disabled most system services that might affect
> I have tried to monitor things closely with top, especially sorted by
> memory usage. I'm doubtful it's a change in usage that is causing this
> because I have such a big (5GB) usual buffer/cached/free area, and I
> really am doing nothing during these tests that would chew through 5GB
> of files or data. For instance, my cached line in top stays roughly
> the same. That would mean that it would have to be 4GB+ of other files
> being read to flush out the stuff I want cached.
> I run a lot of services but I've disabled all "automatic" and "desktop"
> stuff, for instance I run no desktop index program, or anything like
> It used to be that the only thing that would "uncache" my files is
> watching some videos that obviously can chew through a few GB cache
You might also be interested in this article...
Specifically, the part about the vmtouch command and the "-dl"
(daemonize and lock) option. It would allow you to lock your large
file(s) into memory while you work on them, I think. That way, other
system activity won't evict your cached pages.
>> Have you tried setting swappiness all the way to 100? Did that have
>> no effect?
> I'll try that next. The more I read about swappiness, the more I get
> confused whether in my case I want it set closer to 0 or closer to
> 100. I thought 100, but it really doesn't frame things in terms of
I think you'd want to go to 100, to encourage more swapping, which would
have the side-effect of (hopefully) leaving more memory available for
Gilbert E. Detillieux E-mail: <gedetil at muug.mb.ca>
Manitoba UNIX User Group Web: http://www.muug.mb.ca/
PO Box 130 St-Boniface Phone: (204)474-8161
Winnipeg MB CANADA R2H 3B4 Fax: (204)474-7609
More information about the Roundtable