Re: Swap space

From: Bob Johnson (fbsdlists_at_gmail.com)
Date: 11/01/05

  • Next message: Jerry McAllister: "Re: Swap space"
    Date: Tue, 1 Nov 2005 10:50:43 -0500
    To: Ian Lord <mailing-lists@msdi.ca>
    
    

    On 11/1/05, Ian Lord <mailing-lists@msdi.ca> wrote:
    > Hi,
    >
    > I just bought 4 servers with 4 gigs of ram, the documentation
    > proposes to use 2 to 3 times the amount of ram for swap... I don't
    > think 12 gigs of swap would be useful lol, but do I really need to
    > put 4 gigs of ram. (It might be useful for kernel dump but...)
    >

    That's the original reason for the suggestion. You need more than
    twice the amount of RAM if you need to capture a dump for debugging.
    If you won't ever be doing that, you may not need so much swap.

    My experience is that if you have much more than twice the RAM size
    swapped out, things start to get so sluggish that it is better to find
    a way to reduce your memory requirement or provide more physical
    memory. Of course, that is characteristic of MY usage and may not
    apply at all to your usage, but it may be the reason that 3xRAM is the
    upper limit of what is routinely recommended.

    > What do you guys do with swap space in this scenario ?

    Provide what you think you will need. It depends on what you expect
    to be doing with your memory. A busy mail server that will be using
    huge amounts of temporary storage to manipulate the messages may not
    need a lot of swap, simply because you might prefer to throttle
    incoming mail when the system gets heavily loaded rather than get deep
    into swap and slow the system down.

    I configured my new 4GB servers with 4GB of swap. That's more than I
    expect to ever need, but I have oodles of disk space. If you have
    multiple drives, you may want to spread that out among the drives for
    more efficiency (but to do a dump you need enough contiguous space on
    one drive).

    - Bob
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Jerry McAllister: "Re: Swap space"

    Relevant Pages

    • Re: Using USB flash as swap space.
      ... Of course that won't help if you're low on memory ... These drives are on USB and if you can't use a modern memory stick ... of swapping out of memory, you'd expect swap to be written just as much ... Write speeds are considerably slower. ...
      (Ubuntu)
    • Re: Swap space question
      ... "Reserve two to five times as much disk space as you have real memory ... intend to use all of this swap space, ... It has also been said that if you write frequently to two drives it can ...
      (Fedora)
    • Re: min disk size for (useful) desktop
      ... I don't build desktops so I don't know what people normally do for swap size but it's good to remember at build time if you have small drives. ... You didn't mention how much memory you have, but if it's large, you may find yourself cramped in 20G due to swap allocation and additionally might need to turn crashdumps off. ...
      (freebsd-questions)
    • Re: kernel panic with memory disks
      ... swap Swap space is used to back this memory disk. ... and I thought that type swap is always stored on the hard drives. ... swap Backing store is allocated from buffer memory. ...
      (freebsd-current)
    • Re: delayed write failed
      ... I could be looking in the wrong place or at the wrong drives of course. ... Right, I see, until you pointed them out to me I hadn't spotted any 10k SATAs, however now you have and it turns out they're just as zbarlous as 10k SCSI drives I'm not sure there's much point. ... Also, I suspect if I were just to use the SD cards as swap space then when they died the computer would crash, presumably losing whatever I was jaybecksing on at the time, rather than insidiously forgetting large chunks of data while I wasn't looking. ... This is fair enough for the drive that first started showing errors as that's where the swap file liveshowever I've been getting the same errors for the other internal SCSI drive and even a couple for the external USB drive I backed it all up to, neither of which are supposed to be involved in memory swapping at all. ...
      (uk.rec.sheds)