[GAP Forum] Swap partitions.

Frank Lübeck Frank.Luebeck at math.rwth-aachen.de
Wed Jul 20 15:21:35 BST 2005


On Mon, Jul 18, 2005 at 01:38:11PM +0200, Miguel Marco wrote:
> I have seen an strange behavior of gap concerning swap memory.
> The computer it runs on has two partitions of swap, but gap only seems to use 
> one of them.

Dear Miguel Marco, dear Forum,

The gap program itself doesn't know about physical and swap memory. Using
swap memory is a task of the operating system. You should see the same 
behaviour with all programs which use a lot of memory.

> Besides, when there is unused space in the swap partition it uses, gap runs 
> normally, using almost all the CPU time; but when the swap partition is full, 
> the CPU time that gap uses falls down to the minimum.

When your gap job is so big that it uses swap space, the proportion of CPU
cycles it gets depends very much on what exactly you are doing. 

For example: If you store a huge amount of data and access them random-like,
there is probably a lot of swaping and gap becomes very slow. 
If you have many data but you are computing with small objects which are
used temporarily, then gap is happy with doing some "partial garbage
collections" which may only need  parts of the memory which are in 
the physical RAM. In such a case you can see gap getting almost all the CPU
cycles.
But if gap has filled most of its available memory with data it does "full
garbage collections" - first looking for objects which are no longer needed,
and then moving all needed objects to the beginning of the available memory -
when this happens  a lot of swaping is necessary and gap slows down
dramatically. 

Whenever possible try to avoid running gap such that it needs swap space.

With best regards,

  Frank Luebeck


-- 
///  Dr. Frank Lübeck, Lehrstuhl D für Mathematik, Templergraben 64,  ///
\\\                    52062 Aachen, Germany                          \\\
///  E-mail: Frank.Luebeck at Math.RWTH-Aachen.De                        ///
\\\  WWW:    http://www.math.rwth-aachen.de/~Frank.Luebeck/           \\\





More information about the Forum mailing list