Mailing List Archive


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

Re: [tlug] Possible command to boost to laptop performance



Dave M G writes:

 > After having played with it a while, the speed improvement I'm seeing is
 > only to do with switching programs. Sometimes, when the memory usage is
 > high, it can take a minute (seriously) to switch between Netbeans and
 > Firefox. I can't hear the hard drive swapping, since it's a very quiet
 > HD, but I assume that's what's happening.

Ah, I think I see what's happening, then.  If you clear the cache
first, then probably this is the story:

1.  Linux mmaps the program's executable pages.
2.  Linux starts it running, which because of mmap means that it swaps
    in executable code on demand (ie, if the next instruction isn't in
    memory, the page gets swapped in).
3.  Because the program is running, its pages get high priority for
    optimistic caching in the background -- later, the probability
    that its pages are already in memory goes way up.

But if the cache is already full, pages get swapped in only on demand,
which is much slower than if they're already in memory.

Still, if this is the story, as the # of pages actually read by the
process goes up, the cache ought to go down so that the running
process needs to swap less.  Over time (a dozen switches or so) memory
ought to end up mostly populated with frequently used code from your
two most frequently used applications.  So if you use only those two
apps for a while, the switch time ought to go down to a couple of
seconds.

Does that fit you experience?  If not, I suspect there's a bug in the
memory allocation algorithm.

P.S.  Dave, you ought to talk to a business consultant about your
budget issues.  It sounds like you're working quite a bit but you're
not able to afford the equipment to work efficiently.  (I know it's
fun to root your phone, but you should be able to buy a Galaxy for
your job and play with your HT-03A, right?)  While I can't promise you
that a consultant can help you with the cash flow, many times they
can, at least enough to let you concentrate on work rather than
infrastructure.  I don't know any *good but affordable* ones offhand,
but it might be possible to get you some *free and possibly useful*
advice from our MBAs-in-training.




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links