* Swap space for Digital Unix
@ 1999-01-26 5:00 bart
1999-01-26 5:00 ` Waco Johnny D
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: bart @ 1999-01-26 5:00 UTC (permalink / raw)
There is an internal debate between the support and development
groups within my company regarding the amount of swap space required by
DU 4.0x. The development group asserts that Digital/Compaq "will not
support a system with swap space = memory size". Furthermore, Digital/Compaq
and "common Unix rules of thumb" dictate that swap space should be 2-3 times
memory size.
To me, making such a statement without equivocation is ridiculous.
To take an extreme example, if I had a system in which the operating system
and application fit into a fraction of the available physical memory,
then I would think I would need very little swap space.
Am I perhaps ignorant of some imaginative use DU makes of swap
space in the presence of a properly sized or over abundance of main memory?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Swap space for Digital Unix
1999-01-26 5:00 Swap space for Digital Unix bart
@ 1999-01-26 5:00 ` Waco Johnny D
1999-01-26 5:00 ` James Nuckolls
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Waco Johnny D @ 1999-01-26 5:00 UTC (permalink / raw)
As with most discussions in the computing world, the answer is, "It depends."
My 4GB 4100 servers run with 128MB of swap from the b partition of one disk.
I know the systems are stable and I don't want space for a dump. I know the VM
consumption of the systems at full load, and I've used vmubc and collect to
watch free memory over time, so I know my chances of swapping are zilch.
I think the need for swap space:
- decreases with a system's "transaction-based nature," swapping being the
bane of a responsive interactive system
- increases with uncertainty about system VM usage under full load
- increases with uncertainty regarding system (application and OS) stability
and therefore regarding the requirement to capture dumps early in the system's
life
- increases with incomplete/ignored UBC tuning
- increases with a system's "newness in the shop" due to the production
admins not having a feel for it yet
All that said, disks are getting cheap enough so that having the swap space
there isn't that much of a financial hardship. Well, that is, until the point
where you have to buy a new controller and SCSI shelf to put the swap disk in
because all your current ones are full! ;-)
I agree with you -- those "blanket statements" are a little hard to take.
WJD
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Swap space for Digital Unix
1999-01-26 5:00 Swap space for Digital Unix bart
1999-01-26 5:00 ` Waco Johnny D
@ 1999-01-26 5:00 ` James Nuckolls
1999-01-27 5:00 ` Chris Petersen
1999-01-27 5:00 ` Nikola Milutinovic
1999-01-27 5:00 ` Jeffrey J. Potoff
3 siblings, 1 reply; 6+ messages in thread
From: James Nuckolls @ 1999-01-26 5:00 UTC (permalink / raw)
On Tue, 26 Jan 1999 16:48:59 GMT, bart@CTI01.COMVERSE.COM <bart@CTI01.COMVERSE.COM> wrote:
> There is an internal debate between the support and development
>groups within my company regarding the amount of swap space required by
>DU 4.0x. The development group asserts that Digital/Compaq "will not
>support a system with swap space = memory size". Furthermore, Digital/Compaq
>and "common Unix rules of thumb" dictate that swap space should be 2-3 times
>memory size.
In the default swap mode ("immediate mode") OSF does want
at least swap space == memory size. This be becuase OSF pre-allocates
swapspace at the same time it allocates memory[1]. This is for two reasons:
1. Make sure there's enough swap space available, just in case.
2. Increase the speed of the swapper. The swapper no longer
needs to allocate space for pageouts during the pageout
process, as this has already been done.
In at least my case (where swapping causes annoying side effects, like
ringing phones...), paging is rare, and "immediate mode" does not make
much since (why burn the cycles, disk IO, and disk space to allocate
swap space I don't need?), I set the swapper for lazy, or over
commitment mode ("defered mode"). In this case, very little swap is
manageable[2][3].
How do you turn on lazy mode? Easy, delete /sbin/swapdefault and reboot.
[1] This method works great in theoy, if you have a machine with very
high memory comsumption. This would be a machine that will
(eventually) swap. Why? The act of swapping is now immeadite, as the
swap space is already allocated. In the machine that never swaps (like
all my OSF machines), this is bad.
[2] Note that I would strongly suggest swap space == memory size, as
there's no way you can get core files should your machine panic.
Versions of OSF >= 4.0d do write compressed core files, but I think
savecore preforms this operation.
[3] I have been able to build a machine with 512K of swap in the past.
Note that you MUST set the machine to lazy mode BEFORE you boot for the
first time off the new root disk.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Swap space for Digital Unix
1999-01-26 5:00 Swap space for Digital Unix bart
1999-01-26 5:00 ` Waco Johnny D
1999-01-26 5:00 ` James Nuckolls
@ 1999-01-27 5:00 ` Nikola Milutinovic
1999-01-27 5:00 ` Jeffrey J. Potoff
3 siblings, 0 replies; 6+ messages in thread
From: Nikola Milutinovic @ 1999-01-27 5:00 UTC (permalink / raw)
bart@CTI01.COMVERSE.COM wrote:
>
> There is an internal debate between the support and development
> groups within my company regarding the amount of swap space required by
> DU 4.0x. The development group asserts that Digital/Compaq "will not
> support a system with swap space = memory size". Furthermore, Digital/Compaq
> and "common Unix rules of thumb" dictate that swap space should be 2-3 times
> memory size.
> To me, making such a statement without equivocation is ridiculous.
Well, this has caused a lot of debate in the past, so lets set it straight.
1. If all of your programs fit into the RAM, you don't need swap at all. DU has
the swap built into it, so it requires the presence of swap, but I'm almost sure
it can be left out. The system will work. Take a look at DU 4.0 installation; no
swap and X Windows is running. :-)
2. If your programs cannot fit into the RAM, then you need swap. If you exceed
RAM + SWAP, you get "out of memeory" error. Actually it starts happening at 10%
SWAP FREE.
3. You can have any amount of RAM and any amount of SWAP on the system. It will
service tasks, as long as the condition (2) is met.
So, what is this story on "SWAP = 2-3 times RAM"? I mean, if you run out of
memory, give it secondary swap of 10 times RAM, it's OK, right?
Well, not exactly. If you have 512 MB RAM and 1 GB SWAP and you need 5 GB
virtual memory, you could give it 5 GB SWAP, but things will run at "snail
speed". It is much better to add apropriate amount of both RAM and SWAP, so that
RAM + SWAP (3xRAM) = 4xRAM = 5 GB.
And that is "the rule of the thumb". For a particular amount of RAM configure
SWAP to be no more than 3xRAM and you'll run optimally. If you run out of
memory, you can patch things with more swap, but at the cost of speed. The
proper solution is more RAM and SWAP.
Nix.
--
Ruka ruku mije, a pesnica bije.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Swap space for Digital Unix
1999-01-26 5:00 Swap space for Digital Unix bart
` (2 preceding siblings ...)
1999-01-27 5:00 ` Nikola Milutinovic
@ 1999-01-27 5:00 ` Jeffrey J. Potoff
3 siblings, 0 replies; 6+ messages in thread
From: Jeffrey J. Potoff @ 1999-01-27 5:00 UTC (permalink / raw)
bart@CTI01.COMVERSE.COM wrote:
>
> There is an internal debate between the support and development
> groups within my company regarding the amount of swap space required by
> DU 4.0x. The development group asserts that Digital/Compaq "will not
> support a system with swap space = memory size". Furthermore, Digital/Compaq
> and "common Unix rules of thumb" dictate that swap space should be 2-3 times
> memory size.
This is untrue. In fact, the machine can run quite well with *less* swap
than physical memory. Not that it's the best situation, but it's possible.
> To me, making such a statement without equivocation is ridiculous.
> To take an extreme example, if I had a system in which the operating system
> and application fit into a fraction of the available physical memory,
> then I would think I would need very little swap space.
> Am I perhaps ignorant of some imaginative use DU makes of swap
> space in the presence of a properly sized or over abundance of main memory?
To learn more about how DU manages swap, try "man swapon".
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Swap space for Digital Unix
1999-01-26 5:00 ` James Nuckolls
@ 1999-01-27 5:00 ` Chris Petersen
0 siblings, 0 replies; 6+ messages in thread
From: Chris Petersen @ 1999-01-27 5:00 UTC (permalink / raw)
Excellent information, right on track!
James Nuckolls (jamesn@iadfw.net) wrote:
: On Tue, 26 Jan 1999 16:48:59 GMT, bart@CTI01.COMVERSE.COM <bart@CTI01.COMVERSE.COM> wrote:
: > There is an internal debate between the support and development
: >groups within my company regarding the amount of swap space required by
: >DU 4.0x. The development group asserts that Digital/Compaq "will not
: >support a system with swap space = memory size". Furthermore, Digital/Compaq
: >and "common Unix rules of thumb" dictate that swap space should be 2-3 times
: >memory size.
:
: In the default swap mode ("immediate mode") OSF does want
: at least swap space == memory size. This be becuase OSF pre-allocates
: swapspace at the same time it allocates memory[1]. This is for two reasons:
: 1. Make sure there's enough swap space available, just in case.
: 2. Increase the speed of the swapper. The swapper no longer
: needs to allocate space for pageouts during the pageout
: process, as this has already been done.
:
: In at least my case (where swapping causes annoying side effects, like
: ringing phones...), paging is rare, and "immediate mode" does not make
: much since (why burn the cycles, disk IO, and disk space to allocate
: swap space I don't need?), I set the swapper for lazy, or over
: commitment mode ("defered mode"). In this case, very little swap is
: manageable[2][3].
:
: How do you turn on lazy mode? Easy, delete /sbin/swapdefault and reboot.
:
Most engineering applications (CAD/CAE/PDM) that I've worked with require or
at least recommend this on Digital UNIX. In fact, there are few times that
I've heard justification for the other way around.
:
:
: [1] This method works great in theoy, if you have a machine with very
: high memory comsumption. This would be a machine that will
: (eventually) swap. Why? The act of swapping is now immeadite, as the
: swap space is already allocated. In the machine that never swaps (like
: all my OSF machines), this is bad.
:
: [2] Note that I would strongly suggest swap space == memory size, as
: there's no way you can get core files should your machine panic.
: Versions of OSF >= 4.0d do write compressed core files, but I think
: savecore preforms this operation.
Very good point.
:
: [3] I have been able to build a machine with 512K of swap in the past.
: Note that you MUST set the machine to lazy mode BEFORE you boot for the
: first time off the new root disk.
:
To add to the standard rule of thumb argument, within my company's own
installation manuals you'll find the recommendation for swap = 2xRAM on most
32-bit Unices and swap = 4xRAM on 64-bit (Digital UNIX, others now). My
"rule of thumb" is obviously first of all to have enough memory to do the
job, but there can be times that this is a hard target to hit, when you're
dealing with CAD data ranging from 2 MB files up to 100 MB+ Assembly files.
As such, we took to having at least 128MB swap on the OS disk, and a second
disk with swap = 4xRAM - 128 just to be sure. This has never caused me a
problem, and with disk inexpensive as it is, seems like an acceptable
insurance policy to me. I would not recommend more than 4xRAM for swap,
this has caused no end of problems in the past (maybe unrelated, but
definetely bizarre and cleared up when swap was taken down to 4xRAM), and is
really wasteful in the end.
Chris Petersen
Unigraphics Solutions, Inc.
Systems Consultant
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1999-01-27 5:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-26 5:00 Swap space for Digital Unix bart
1999-01-26 5:00 ` Waco Johnny D
1999-01-26 5:00 ` James Nuckolls
1999-01-27 5:00 ` Chris Petersen
1999-01-27 5:00 ` Nikola Milutinovic
1999-01-27 5:00 ` Jeffrey J. Potoff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox