Re: excessive swap-in time



On Mon, 17 Mar 2008 15:59:47 +0100 Rainer Weikusat <rweikusat@xxxxxxxxxxx> wrote:

| If there is significant, continous paging activity on a system, a lot
| of process will continously be blocked, waiting for disk I/O to
| complete, before they can use some pages of memory, because their
| previous contents need to be written to disk if the page was dirty and
| the page content the process expects to be there needs to be read from
| disk insofar the (physical) memory page was used by a different
| process since the time process #0 accessed it last. In addition to
| this, code execution of all processes will need to be wait for disk
| I/O to complete frequently, because code pages which could otherwise
| be cached in memory need to be read or reread from the binaries
| containing them when the pages which held them last time they were
| needed had been reused for something different in the
| meantime. Possibly, the system needs to write the contents of some
| dirty pages to disk before it can read the code into them. Disk-I/O is
| slow, compared to memory accesses, hence, processes on a system whose
| working set does not fit into (physical) memory run slow.
|
| This is not 'some evil conspiracy of "the Linux people"' but a
| physical, measurable phenomenon. The way to speed things up is to
| EITHER ADD MORE GODDAMN MEMORY OR REDUCE THE F***ING MEMORY DEMANDS OF
| THE SOFTWARE.

This does not need to apply when the process BY ITSELF fits well into
memory. If it has been swapped out due to past inactivity, and other
processes now occupy the RAM, but have themselves become inactive, then
when that one process that is swapped out needs to be swapped in, there
is NO JUSTIFICATION for the kernel to choose the pages of the NOW ACTIVE
process in lieu of the NOW INACTIVE processes. Is it that hard for the
kernel to know which processes are active and which are inactive?


| Was that loud enough to get past the dirt barrier inside your ears this
| time?

I doubt it will have much of an impact on the Firefox people. They will
just point fingers at each of the huge number of reusable toolkits their
beastly software uses ... toolkits that make huge uncoordicated data
structures that fragment the heap such that even when lots of windows
and web sites are closed, very few whole pages are released back to the
system. So when it needs to do anything, it still has a wide (in terms
of page count) footprint of data structures being scanned, and thus a
very large working set ... larger than if a fresh new instance were to
just go directly to all the web pages that are now open.


|> while it is well known and demonstrated that a system can very well
|> function fine and dandy with a constant stream of paging to swap.
|
| Believe it or not, but some (actually, quite a few) people are really
| old enough to personally remember the time when this was the general
| and not exceptional case.

If there is paging activity, there is some process waiting for it, unless
it is some kind of intelligent speculative activity.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2008-03-17-1445@xxxxxxxx |
|------------------------------------/-------------------------------------|
.



Relevant Pages

  • Re: excessive swap-in time
    ... A good VM system should strive to have a minimum of paging activity since ... certain memory page otherwise, there will be a need to initiate disk ... trashing to occur, because no free memory is available to satisfy it ...
    (comp.os.linux.development.system)
  • Proposed Assembler Commands
    ... ACM Automatically Clear Memory ... BKCRDR Backspace Card Reader ... BKSPD Backspace Disk ... EIAO Execute In Any Order ...
    (sci.electronics.design)
  • Re: Att. Alex Nichol -VM cont.
    ... I find documentation that says a 4kb page in memory is written to the hard ... manner that a 4kb memory page is equal to a 4kb cluster written on the disk". ... So where is the basis for saying since 4kb paging in memory that 4kb clusters ...
    (microsoft.public.windowsxp.general)
  • Re: Slow performance
    ... Leaving your computer on 24/7 means that if any programme has a memory ... The Disk Defragmenter report shows you have minimal free disk space. ... select Properties, General, Advanced and check the box before Compress ... Volume fragmentation ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Slow performance
    ... I realize that the pagefile usage is excessive and I need to reduce memory ... I've never messed with those settings before. ... Peak are greatly in excess of the installed RAM. ... The Disk Defragmenter report shows you have minimal free disk space. ...
    (microsoft.public.windowsxp.perform_maintain)