Re: excessive swap-in time



talon@xxxxxxxxxxxxxxxx (Michel Talon) writes:
phil-news-nospam@xxxxxxxx wrote:
On Mon, 17 Mar 2008 22:08:30 +0000 (UTC) Michel Talon <talon@xxxxxxxxxxxxxxxx> wrote:

|> If there is paging activity, there is some process waiting for it, unless
|> it is some kind of intelligent speculative activity.
|>
|
| Which is exactly the point of a good VM system.

A good VM system should strive to have a minimum of paging activity since
any such activity represents system slowdowns due to page wait.

Not really.

Repeating this nonsense a couple of more times will not suddenly cause
it to be less nonsensical. As soon as the systems needs to use paging
to free up physical memory because it cannot satisfy a request for a
certain memory page otherwise, there will be a need to initiate disk
I/O and wait until that has completed and because disk I/O is still a
lot slower than accessing RAM, this will take more time to complete
than the same memory access had needed if it could have been

[pointless digression deleted]

Anyways it is rational to load a server to the point where RAM is
fully used and even a little swap, as long as this does not cause
slowdowns.

As soon as swap is going to be used (used to enable the running
processes of the machine to 'actively use' more virtual memory than
the computer has RAM, NOT proactive background paging done by the
kernel), this will cause 'a slowdown' because it still means some
process has to wait for disk I/O which would not have to wait if more
RAM was available.

Independently of this, if you increase the workload of some computer
until all physical memory is being (actively) used by some processes,
the kernel will no longer be able to allocate memory for certain
operations, like receiving packets from the network, except if those
allocation requests can sleep, will have no memory to use for disk
caching and a sudden, externally induced load spike will cause
trashing to occur, because no free memory is available to satisfy it
without kicking active pages out first.

In this situation, a good VM system manages the necessary paging,
and does so in the least disruptive way, and above all, without
trashing. This means that a page must never be evicted and called
back immediately after.

'Trashing' is a condition where each (or most) of the memory accesses
done by the processes running on the system cause 'major faults'
because the memory pages they used when they ran last time have been
reassigned in the meantime: Whenever some process needs to access
memory, it current content needs to be written to the paging area, the
old content needs to be read from there, and as soon as another
processes needs to access memory, the same sequence of actions needs
to be repeated. The system has (compared to the virtual memory
requirements) so litte RAM that it regularly needs to move active
pages of most (or all) processes to the disk to assign the memory to
other processes.

If a single page was evicted and needs to be reloaded 'soon', this
just means that the heuristics the VM uses to determine good
candidates for eviction failed to predict the future accurately. Which
is to be expected for any heuristic now and then.

In this respect you are right, a good VM system minimises the paging
activity, under the external constraints. As soon as trashing occurs
the paging activity explodes, and the performance falls down completely.

Of course, if you can manage the load so that no swapping at all occurs,
then the VM performance becomes very secondary. Note that "no swapping at
all" does not mean only that nothing is written to the swap partition.
Another form of paging activity is eviction of pages from text segment
of the binaries (sitting usually under /usr/bin) or libraries, and their
reloading from disk afterwards. So you must have enough memory so that
this last phenomenon never occurs, if you want to play the game of a
totally swapless machine.

The last phenomenon does not need paging areas, because the data
already resides on disk.
.



Relevant Pages

  • Re: excessive swap-in time
    ... | of process will continously be blocked, waiting for disk I/O to ... | complete, before they can use some pages of memory, because their ... If it has been swapped out due to past inactivity, ... If there is paging activity, there is some process waiting for it, unless ...
    (comp.os.linux.development.system)
  • Re: ORACLE ON AIX PERFORMANCE PROBLEMS
    ... causes the page stealer to kick in and free a few frames. ... paging activity to/from paging space, ... SGA to be pinned in memory so that it can never be swapped out. ...
    (comp.unix.aix)
  • Re: excessive swap-in time
    ... I doubt it will have much of an impact on the Firefox people. ... This is the reason why the Firefox people have refined their memory ... If there is paging activity, there is some process waiting for it, unless ... it is some kind of intelligent speculative activity. ...
    (comp.os.linux.development.system)
  • Re: iBook performance and RAM
    ... then you might find more memory useful. ... > vm_stat 'pageout' column. ... > If pageout has moments of high paging activity, ... Russ ...
    (comp.sys.mac.portables)
  • Proposed Assembler Commands
    ... ACM Automatically Clear Memory ... BKCRDR Backspace Card Reader ... BKSPD Backspace Disk ... EIAO Execute In Any Order ...
    (sci.electronics.design)