Re: excessive swap-in time



On Tue, 18 Mar 2008 09:57:46 +0000 (UTC) Michel Talon <talon@xxxxxxxxxxxxxxxx> wrote:
| 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. The minimum of paging activity is decided by extrernal
| factors: the amount of RAM you have bought for the machine, and the load
| you put on the machine. Of course RAM is presently insanely cheap, so
| you can say it is basically a free resource. It was not the case years

There are many cases where the design of chips puts an artificial limit
on the amount of RAM.


| ago, and it will not necessarily the case in the future. 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. 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.
| 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.

There is that barrier of chaotic collapse where thrashing begins. It is
something to be avoided.

I still believe the kernel/VM developers need to not use "get more RAM"
as a crutch. To the extent that the VM system design can avoid that
point where thrashing starts to happen, it should. Having more RAM
certainly should be a part of the equation, just not all of it.


| 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. What would be interesting is to benchmark the
| relative perfomance of such a sitaution with the case of a machine with
| much less memory and and a reasonable small paging activity. Personnally
| i have rarely seen (subjectively) a big difference when boosting the
| memory of my desktop or laptop running recent Linux or FreeBSD (i am
| not considering Windows, of course).

A swapless machine is no game. It is very real in the embedded world.
Fortunately most embedded systems have very specific application needs
and the rest can be avoided.

My new machine is 8GB RAM and 0GB swap space. The next plan is to go with
16GB RAM, 0GB swap, and pre-load /{,usr/}{lib,{,s}bin} into ramfs. What
I guess I would be doing is converting my PC into a giant embedded system
in a sense, at least in how programs run (there would still be a couple of
750GB hard drives).

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



Relevant Pages

  • Re: help on memory usage (top and free commands)
    ... >>Anyway, if you are using SWAP, it means you don't have enough RAM. ... > Why waste money for RAM just to keep inactuve data around? ... > excessive paging activity means that there is shortage of RAM. ...
    (comp.os.linux.setup)
  • Re: RAM
    ... The proper amount of RAM for Windows XP is whatever it takes to reduce ... the actual usage of the page file to zero or close to it. ... eliminate the paging activity thereby improving overall performance. ...
    (microsoft.public.windowsxp.general)
  • Re: excessive swap-in time
    ... A good VM system should strive to have a minimum of paging activity since ... the amount of RAM you have bought for the machine, and the load ... Of course RAM is presently insanely cheap, ... much less memory and and a reasonable small paging activity. ...
    (comp.os.linux.development.system)
  • Re: page file ?
    ... > And with 1 gb of RAM it is quite likely that you are not going to ... > encounter anything much in the way of actual paging activity from ... out your applications to make the disk cache larger. ...
    (microsoft.public.windowsxp.general)
  • Re: help on memory usage (top and free commands)
    ... >Anyway, if you are using SWAP, it means you don't have enough RAM. ... Why waste money for RAM just to keep inactuve data around? ... excessive paging activity means that there is shortage of RAM. ...
    (comp.os.linux.setup)