
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Possible command to boost to laptop performance
- Date: Thu, 4 Nov 2010 14:25:39 +1100
 
- From: Jim Breen <jimbreen@example.com>
 
- Subject: Re: [tlug] Possible command to boost to laptop performance
 
"Stephen J. Turnbull" <stephen@example.com>wrote:
> Josh Glover writes:
>  > I thought the kernel was smart enough to back off the caching as
>  > memory pressure on the system increased.
>
> It's not a question of "smart", it's a question of "dumb enough to be
> genius".  The idea is that you populate memory with slabs of anything
> you think might be useful (next pag(s)e of a file just read, typically,
> or perhaps something mmap'ed but not yet accessed) at the lowest
> possible priority.  If you run out of memory, the cache automatically
> gets reduced: it's just low-priority allocation.
Yep. That's the way it's supposed to work, and AFAIK does work.
My laptop is currently saying:
Mem:   2999160k total,  2480964k used,   518196k free,   254440k buffers
Swap:  8787512k total,   331688k used,  8455824k free,  1527016k cached
and whenever the "free" runs out, you see the "cached" drop away. When
programs aren't using it, a really good use of the RAM is for pre-fetched
files.
> So the cache needs no culling, and backing off is similarly
> unnecessary.  All the interesting questions of cache management, then,
> are on the front end:  what's likely to be useful?
Prexactly.
> I suppose that if the kernel makes very bad decisions about what to
> put in the cache, flushing it might make room for more pages from the
> most recently accessed resources, and this locality might do a better
> job of populating the cache.
Hmm. But good old LRU should handle that properly, ne?
Jim
-- 
Jim Breen
Adjunct Snr Research Fellow, Clayton School of IT, Monash University
Vice-president: Hawthorn Rowing Club, Treasurer: Japanese Studies Centre
Graduate student: Language Technology Group, University of Melbourne
Home |
Main Index |
Thread Index