Re: Kernel option: SWAP

From: James Wilkinson (james_at_westexe.demon.co.uk)
Date: 09/07/04

  • Next message: Ben Steeves: "Re: Matrox G400 dual head & xorg ?"
    Date: Tue, 7 Sep 2004 13:28:22 +0100
    To: fedora-list@redhat.com
    
    

    Juan L. Pastor wrote:
    > I want to increase my knowledge about the options we can choose when
    > recompiling the kernel. I have already encountered some doubts just
    > starting:
    >
    > Support for paging of anonymous memory (swap) (SWAP)
    >
    > This option allows you to choose whether you want to have support
    > for socalled swap devices or swap files in your kernel that are
    > used to provide more virtual memory than the actual RAM present
    > in your computer. If unsure say Y.
    >
    > What king of swap devices or files makes this option reference to?

    You almost certainly have some now. Look at the contents of /proc/swaps:
    it will tell you which devices (which will begin with /dev/) or files
    you have configured.

    Briefly, paging space ("swap" used to mean something different: what
    Linux uses is paging space) is space on the hard drive for the memory
    manager to use. If there's a lot of data in memory, it can push the
    least-used "pages" of memory out to paging space and re-use the physical
    memory. This means that the computer can act as though it has more
    memory than it really has.

    This is the same for Linux, Windows, commercial Unix, MacOS, and the
    BSDs. Linux can use raw devices (partitions on the hard drive) for swap,
    and this is more efficient than files, but either will work.

    > I get
    > the following error recompiling if I disable it:

    Not sure. The kernel.org "vanilla" kernel is supposed to work without
    swap (although that's not necessarily a good idea): it looks like you're
    using Fedora sources, and they might need swap compiled in.

    > I thought that defining the swap filesystem and mounting it with swapon
    > was enough.

    Well, yes, but only if the kernel actually supports swap!

    I'm afraid the phrase "Well Don't Do That Then" comes to mind.

    James.

    -- 
    E-mail address: james | Never ask, "Oh, why were things so much better
    @westexe.demon.co.uk  | in the old days?"
                          | It's not an intelligent question.
                          |     -- Ecclesiastes 7 v. 10
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Ben Steeves: "Re: Matrox G400 dual head & xorg ?"

    Relevant Pages

    • Re: How does Debian load the kernel modules
      ... Windows stupidly swaps the System memory by default. ... Does linux force the modules to stay in RAM or does it try to swap them when it's RAM-hungry? ... I think linux does not swap kernel memory due to its "monolitic kernel" ...
      (Debian-User)
    • Re: limitiation on memory allocation
      ... arrays that are considerably bigger than the physical memory size? ... Yes, upto kernel limits... ... swap space is completely separate from the rest of the equation. ... GB of memory total (for obvious reasons). ...
      (freebsd-questions)
    • Re: paging space
      ... I would suggest to check the official performance management guide, since it describes pretty well how memory management works in AIX. ... Considering the kernel part of your question, as far as I can remember this is not the way how it works. ... Early paging space allocation algorithm can also twist the situation a bit. ...
      (AIX-L)
    • Re: [ck] Re: 2.6.20-ck1
      ... > Has anyone tried booting a kernel with the various patches in question ... > when the kernel thinks it has relatively little memory ... performance improvements for these machines are based on numbers, ... Is it possible to command a program's memory usage be put into swap on ...
      (Linux-Kernel)
    • Re: Whats an oom-killer when its at home?
      ... Anyway the kernel is between a rock and a hard place when it decides to deploy the OOMK, the other choice would be to abend. ... Fedora docs say that oom-killer should pick on big niced programs first, which would make Malaria-control its prime target. ... The program is capable of oversubscribing memory all by itself: it has successfully run to completion despite expanding its heap so it occupies up to 400 MB of virtual memory despite my box only having 256 MB RAM and 1 GB of swap space. ...
      (uk.comp.os.linux)