Re: More on swap.

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

 



Aaron Konstam wrote:
> The only point I am trying to make is that strictly speaking in a VM
> system when the memory gets full segments (or pages) from memory are
> sent back to the disk (in the place on the disk where they come from).

Anonymous pages (those that weren't on disk in the first place, such as
temporary data structures, or where the data originally came from disk,
the data in memory has been modified, but the data on disk is not
supposed to be modified) obviously can't be sent back to the place on
disk where they came from! They have to go to swap space.

> The swap area has a system of indexing the pages it contains that allows
> the system to retrieve segments (or pages) from the swap area faster
> than they can be retrieved from the regular disk partition. What Unix
> (and Linux) introduced is a algorithm to decide under what circumstances
> the strict requirements of a VM system would be violated and segments
> (or pages) would be temporarily placed in the swap space rather than
> back into their original position on the disk. Unless you know under
> which circumstances this occurs you can't really evaluate your need for
> swap space.

This sounds implausible. By far the greatest cost of swapping is simply
the time it takes for the disk drive to read or write the data -- any
overhead in fancy algorithms really is lost in the noise.

James.

-- 
E-mail:     james@ | In a serial interface, the data bits move down a single
aprilcottage.co.uk | channel one after the other, like railway trains. This is
                   | different from the parallel interface in which groups of
                   | bits arrive together, like London buses.
                   |     -- 'The Computer Dictionary', Jon Wedge


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux