Re: How do I determine appropriate swapspace settings? And other partitioning questions.

From: Sir Jackery (root_at_jackery.com)
Date: 02/09/05

  • Next message: Morningdew: "Re: Swap space settings and other partitioning q's"
    Date: Tue, 8 Feb 2005 17:28:04 -0800
    
    

    On Tue, 8 Feb 2005, Paul Sherwin wrote:

    > On , Morningdew <yahooaddyismorning42dew@spam.free> wrote:
    > >
    > >I was just curious to know... What are some good rules of thumb for
    > >configuring swap space under Linux? For that matter, are there any
    > >comprehensive guides or articles on the subject? When I used to admin
    > >NT boxes I used to set their "virtual memory" setting to 1.5 times
    > >physical memory, giving 50% over physical as swap. That was just by
    > >convention, or, "rule of thumb". No great scientific methodology, it is
    > >just what had worked for me and my coworkers for so long. Granted,
    > >Linux is different.
    >
    > There is *no* direct relationship between physical memory and swapfile
    > size. These rules of thumb originated in the 70s when people had to
    > commission systems before knowing what the application mix would be.
    > The idea was that a system with a lot of memory would be used for
    > memory intensive applications, so should have a lot of swapspace as
    > well. Some systems also used swapspace to hold a memory dump in the
    > event of a system crash, so the swap had to be at least as large as
    > physical memory.
    >
    > Modern Linux systems with lots of physical memory will almost never
    > swap, unless you're doing something very unusual. If you find the
    > system is swapping a lot, you should add more physical memory rather
    > than fiddling around with swapspace, My main Linux server is currently
    > using 778k of swapspace, and this is quite typical. Despite this,
    > people keep configuring gigabytes of swapspace.
    >
    > You can always add a swap file later, which will keep you going until
    > you upgrade memory.

    I agree, except you left out that X and its applications use huge amounts
    of memory. All of my servers each have a 128m swap partition and run with
    about 256-512m RAM. They NEVER swap, but there is no point in not having a
    health size swap partition because it is very easy to reclaim the space.
    With the cost of hdd space these days, why not allocate a 512m swap
    partition? It could come in handy in the future. If your computer starts
    to use it, do what morningdew says and add more memory. If your system is
    steadily using your swap it will bottleneck systems performance
    substantially.

    -jackery

    >
    > HTH, Paul
    > --
    > Paul Sherwin Consulting http://paulsherwin.co.uk
    >


  • Next message: Morningdew: "Re: Swap space settings and other partitioning q's"

    Relevant Pages

    • Re: Cant Compile Stalin
      ... Recent versions of gcc require a lot more memory with high ... increasing the amount of swap space you have, ... This performs very poorly, swap is bad enough, but a swap file is ... Linux memory management lies. ...
      (comp.lang.scheme)
    • Re: OT (slightly) swap limits
      ... influence your decision on how much swap was enough. ... processes due to lack of memory. ... I've run machines with 1Gig or more RAM with NO SWAP. ... Linux possible when before on Unix it wasn't? ...
      (Debian-User)
    • Re: OS Performance (was OT: New low for Microsoft!)
      ... >>has inadequate ram and is likely using a lot of swap so performance ... Mozilla is not the bug memory hog, ... >is utilizing and Linux is not. ... attribute this to the way linux uses swap and caches processes because ...
      (Fedora)
    • Re: Problem with RH9
      ... ]have 2 GB of swap space allocated for linux. ... Why have 2GB os swap? ... One lazy program which uses 2GB of memory and wnaders all ... This is worse with lots of swap space. ...
      (comp.os.linux.setup)
    • Re: Problem with RH9
      ... ]have 2 GB of swap space allocated for linux. ... Why have 2GB os swap? ... One lazy program which uses 2GB of memory and wnaders all ... This is worse with lots of swap space. ...
      (comp.os.linux.misc)