swap space choice

swap space choice

Post by Robert Goodi » Fri, 19 Dec 1997 04:00:00



I have a new alpha/linux 533/21164a box with 1/2 GB of RAM. At present,
I am partitioning the hard drive. The "usual" rule is to set aside
twice the size of the RAM as swap space, which means allocating a GB of
disk for swap, an awful lot of space (cheap as it may be at present).
Is this wise/necessary for this kind of machine. (Other advice
about appropriate partitioning for an alpha/linux box would
also be appreciated.)

Thanks    Bob


 
 
 

swap space choice

Post by CoffeeBe » Fri, 19 Dec 1997 04:00:00


: I have a new alpha/linux 533/21164a box with 1/2 GB of RAM. At present,
: I am partitioning the hard drive. The "usual" rule is to set aside
: twice the size of the RAM as swap space, which means allocating a GB of
: disk for swap, an awful lot of space (cheap as it may be at present).
: Is this wise/necessary for this kind of machine. (Other advice
: about appropriate partitioning for an alpha/linux box would
: also be appreciated.)

: Thanks    Bob


I am not positive, but I believe the 2x the RAM swap rule is for
computer which will require a swap space.  Namely, those having small
amounts of memory.  I think it would be safe to allocate 32M or so to
swap, but I really don't think you'll be swapping if you currently
have 500M of RAM. =)

--
danshea

 
 
 

swap space choice

Post by Matthew Marlow » Fri, 19 Dec 1997 04:00:00


If you have 500MB of memory, you must be intending to run some
serious applications or will be putting the system into a
server role.  If the memory is not overkill for what you
are intending to do, then having more swap may be extremely
useful and you should consider an additional 500MB-1GB of swap
space.

For example, a 500MB machine may be excellent as an application
server for a small workgroup, but you still want a good deal of
swap space in case your users grow accustomed to being able
to iconize and suspend applications when not in use, instead
of closing the applications.  Usage habits adjust to available
memory :)

I believe the x2 rule comes from the theory that any additional
swap space above x2 is not useful - the system will spend all its
time page faulting instead of being useful.  So, you should
consider x2 as the upper bound, and not a suggested minimum.

As always, memory requirements depend on what you are doing.
Don't listen to any rules in this case.

M. Marlowe


> I am not positive, but I believe the 2x the RAM swap rule is for
> computer which will require a swap space.  Namely, those having small
> amounts of memory.  I think it would be safe to allocate 32M or so to
> swap, but I really don't think you'll be swapping if you currently
> have 500M of RAM. =)

> --
> danshea

--

Director, Network Services                      (P) 212-539-0900 x413
methodfive                                      (F) 212-539-0100
 
 
 

swap space choice

Post by John R. Campbe » Fri, 19 Dec 1997 04:00:00



>If you have 500MB of memory, you must be intending to run some
>serious applications or will be putting the system into a
>server role.  If the memory is not overkill for what you
>are intending to do, then having more swap may be extremely
>useful and you should consider an additional 500MB-1GB of swap
>space.

>For example, a 500MB machine may be excellent as an application
>server for a small workgroup, but you still want a good deal of
>swap space in case your users grow accustomed to being able
>to iconize and suspend applications when not in use, instead
>of closing the applications.  Usage habits adjust to available
>memory :)

        Actually, you don't tend to run end-user applications on a
        server;  It's primarily there to deal with delivering files.
        Mind you, you can also run a database server, too, but 500MB
        would provide a sh*tload of cache space for indices (assuming
        you can talk the DB engine into maintaining that kind of a
        cache in memory).

Quote:>I believe the x2 rule comes from the theory that any additional
>swap space above x2 is not useful - the system will spend all its
>time page faulting instead of being useful.  So, you should
>consider x2 as the upper bound, and not a suggested minimum.

        In Linux, the paging space isn't shadowing the main memory
        (unlike older Unix systems and XENIX);  The paging space is
        in addition to the main memory (I keep wanting to say "core").

        So, 500MB or RAM + 500MB of paging space = 1000MB of virtual
        memory.

        Unfortunately, however, things get worse quickly;  If you're
        gonna go for a 2:1 overcommitment ratio, well, have lots of
        drives and distribute the paging spaces across them as flatly
        as possible (the larger an individual space, the more latency).
        Latency in paging space is more poisonous than elsewhere since
        we're stalling a LOT of regular I/O pending this one fetch.

        BTW, a memory OCR of 1.5:1, if used, is real close to thrashing.
        While 2:1 can be nice, it only buys you a little bit of time
        to bring a thrashing system under control.

        Oh, yes, please remember (assuming my memory is correct) that
        the code segment of each executable that is running is part of
        the paging space;  Since code is nominally read-only, it doesn't
        get stored to the paging volume but, when needed again, gets
        sucked in from the executable program file.  Heck, when you
        start up a program, the process only loads one code page (the
        first one) and the rest of the program is loaded via page faults.
        This is one reason you can't delete a running executable (or
        write into it, either).

--

 - As a SysAdmin, yes, I CAN read your e-mail, but I DON'T get that bored!
   Disclaimer:  I'm just a consultant at the bottom of the food chain, so,
                if you're thinking I speak for anyone but myself, you must
                have more lawyers than sense.

 
 
 

swap space choice

Post by Greg Linda » Sat, 20 Dec 1997 04:00:00



Quote:>    Actually, you don't tend to run end-user applications on a
>    server;  It's primarily there to deal with delivering files.

I run user applications on my servers all the time; You shouldn't
assume that any situation is typical. In my environment, I have 20
developers with PC's running Windoze on their desks, and 20+ ppro
servers which they develop on. These "servers" are more than just
"file servers".

Quote:>    This is one reason you can't delete a running executable (or
>    write into it, either).

But you _can_ unlink it. It just doesn't go away because it's open.

-- g

 
 
 

swap space choice

Post by Christoph Franze » Sun, 28 Dec 1997 04:00:00


Dear Robert,

RG> I have a new alpha/linux 533/21164a box with 1/2 GB of RAM. At present,
RG> I am partitioning the hard drive. The "usual" rule is to set aside
RG> twice the size of the RAM as swap space, which means allocating a GB of
RG> disk for swap, an awful lot of space (cheap as it may be at present).
RG> Is this wise/necessary for this kind of machine. (Other advice
RG> about appropriate partitioning for an alpha/linux box would
RG> also be appreciated.)

You did'nt tell about your installed hard drive(s) and the space on it/them,
you did'nt tell anything about your space requirements for other software or
data and what you intend to do with the machine, so it's hard to give any
advice. I haven't much experience, but I think 1 GB would most likely mean to
waste a lot of disk space.

At least, it's important to keep in mind the swap space size limit of 512 MB
per partition on alphas.

Viele Gruesse, Christoph

 
 
 

swap space choice

Post by Christoph Franze » Sun, 28 Dec 1997 04:00:00


Dear Robert,

RG> I have a new alpha/linux 533/21164a box with 1/2 GB of RAM. At present,
RG> I am partitioning the hard drive. The "usual" rule is to set aside
RG> twice the size of the RAM as swap space, which means allocating a GB of
RG> disk for swap, an awful lot of space (cheap as it may be at present).
RG> Is this wise/necessary for this kind of machine. (Other advice
RG> about appropriate partitioning for an alpha/linux box would
RG> also be appreciated.)

You did'nt tell about your installed hard drive(s) and the space on it/them,
you did'nt tell anything about your space requirements for other software or
data and what you intend to do with the machine, so it's hard to give any
advice. I haven't much experience, but I think 1 GB would most likely mean to
waste a lot of disk space.

At least, it's important to keep in mind the swap space size limit of 512 MB
per partition on alphas.

Viele Gruesse, Christoph

 
 
 

1. plenty of swap space, but keep receiving error "swap space limit exceeded"

Syslog reports
  unix: WARNING: /tmp: File system full, swap space limit exceeded

But

  Filesystem            kbytes    used   avail capacity  Mounted on
  swap                 2423720   48480 2375240     3%    /tmp

The host:
  SunOS <hostname> 5.7 Generic_106541-16 sun4u sparc SUNW,Ultra-60

I ran vmstat 1 for some time and watched for available swap space to
go to zero. But the lowest it would go is 75kB.

When analyzing this problem, I ran into the following error twice, but
for different commands:
  Can't run command <command>
  fork(2) failed; no more memory

What's going on?

Thanks.

2. Pentium II & Adaptec 3940 Compatability

3. Try to mount a seocn SWAP space-- error" unable to find swap space signature"

4. How to export SGI to Linux/X?(GL)

5. Is swap space in SCO only swap space or is it consider virtual memory

6. The time zone refuses to be changed

7. Allocated swap space versus used swap space

8. ZIP Plus

9. Adding swap space using 'swap -a' command ?

10. Only 16MB swap space with 30 MB swap file ?

11. How to remove swap partition/swap space

12. Same space for OS/2 swap file/Linux swap partition?

13. Swap pager question ( out of swap space )