Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* swap space warning
@ 1995-04-28  4:00 George Armhold
  1995-04-29  4:00 ` Brian Saunders
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: George Armhold @ 1995-04-28  4:00 UTC (permalink / raw)



We have a Sable 2100 with 1 GB of real memory.  It's configured with
196MB swap on it's primary disk, and 1GB swap on a second disk.  I
keep getting syslog (I assume it's syslog) warnings: "swap space below
10 percent free", when there is really plenty of swap space available,
as shown by vmstat and top.  Perhaps whatever prints this message only
considers the primary swap device when deciding when to generate the
warning?

-George

--
         HyperComputing and Design group @ Rutgers University
                 Internet: armhold@cs.rutgers.edu
                    BITNET: armhold@PISCES.BITNET
                 http://www.cs.rutgers.edu/~armhold



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
  1995-04-28  4:00 George Armhold
@ 1995-04-29  4:00 ` Brian Saunders
  1995-05-01  4:00   ` George Armhold
  1995-05-03  4:00 ` Daniel S. Riley
  1995-05-04  4:00 ` Daniel S. Riley
  2 siblings, 1 reply; 15+ messages in thread
From: Brian Saunders @ 1995-04-29  4:00 UTC (permalink / raw)


In article <3nrief$366@tenebris.rutgers.edu>, armhold@tenebris.rutgers.edu
(George Armhold) wrote:

> We have a Sable 2100 with 1 GB of real memory.  It's configured with
> 196MB swap on it's primary disk, and 1GB swap on a second disk.  I
> keep getting syslog (I assume it's syslog) warnings: "swap space below
> 10 percent free", when there is really plenty of swap space available,
> as shown by vmstat and top.  Perhaps whatever prints this message only
> considers the primary swap device when deciding when to generate the
> warning?

1 GB Memory!?!?!?  And you are asking us for advice? :^)

Are you in lazy or eager swap mode?  In other words, is there a file named
/sbin/swapdefault?  If so, the computer reserves swap space for jobs when
they are executed, rather than on a need basis.  In situations like this,
you usually need at least 2 times the physical memory as swap space to
avoid this.

If you don't see yourself using up that 1 GB too often, and want to take a
slight risk, remove /sbin/swapdefault and reboot.  You will get a startup
warning about being in deferred swap mode (i.e. lazy swap mode - which
only gets the swap when it needs it).  Most of the time, this should not
be a problem, but if you ever fill up all of your physical memory, you
could end up needing over 1.196 GB of swap, and since it won't be
available, it will kill jobs (non-critical usually) indiscriminately so
that there will be enough space.

-- 
Brian E. Saunders                  saunders@castor.che.wisc.edu



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
@ 1995-05-01  4:00   ` George Armhold
  0 siblings, 0 replies; 15+ messages in thread
From: George Armhold @ 1995-05-01  4:00 UTC (permalink / raw)


saunders@castor.che.wisc.edu (Brian Saunders) writes:

:In article <3nrief$366@tenebris.rutgers.edu:, armhold@tenebris.rutgers.edu
:(George Armhold) wrote:

:: We have a Sable 2100 with 1 GB of real memory.  It's configured with
:: 196MB swap on it's primary disk, and 1GB swap on a second disk.  I
:: keep getting syslog (I assume it's syslog) warnings: "swap space below
:: 10 percent free", when there is really plenty of swap space available,
:: as shown by vmstat and top.  Perhaps whatever prints this message only
:: considers the primary swap device when deciding when to generate the
:: warning?

:1 GB Memory!?!?!?  And you are asking us for advice? :^)

:Are you in lazy or eager swap mode?  In other words, is there a file named
:/sbin/swapdefault?  If so, the computer reserves swap space for jobs when
:they are executed, rather than on a need basis.  In situations like this,
:you usually need at least 2 times the physical memory as swap space to
:avoid this.

Eager swap mode, with swapdefault pointing to the 196MB swap
partition. The general "rule of thumb" in swap space allocation is 2 X
phys mem, however given that we have 1GB of real memory we don't
really expect to need a 2GB address space (then again, ...)  I could
increase the swap space, however I don't think this will solve the
problem since we're seeing the messages well before we're at the 10
percent level.  My guess is that whatever generates the warnings isn't
considering the fact that swap is spread out over two devices.

Oh, and I forget to mention in my original posting that this was with
OSF/1 3.2.

-George



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
       [not found] <3nrief$366@tenebris.rutgers.edu: <saunders-2904951815390001@caspar.che.wisc.edu: <3o34dd$41o@tenebris.rutgers.edu>
@ 1995-05-02  4:00 ` Brian Saunders
  1995-05-03  4:00   ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
  1995-05-03  4:00 ` Eric Osborne
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Brian Saunders @ 1995-05-02  4:00 UTC (permalink / raw)


In article <3o34dd$41o@tenebris.rutgers.edu>, armhold@tenebris.rutgers.edu
(George Armhold) wrote:

> Eager swap mode, with swapdefault pointing to the 196MB swap
> partition. The general "rule of thumb" in swap space allocation is 2 X
> phys mem, however given that we have 1GB of real memory we don't
> really expect to need a 2GB address space (then again, ...)  I could
> increase the swap space, however I don't think this will solve the
> problem since we're seeing the messages well before we're at the 10
> percent level.  My guess is that whatever generates the warnings isn't
> considering the fact that swap is spread out over two devices.

10% level meaning 10% of physical memory, or 10% swap space used?  I guess
it probably wouldn't matter much, but there is quite a difference between
reserved swap space and used swap space, in eager mode.  I'd still suggest
trying lazy mode.

It's funny how Digital employees avoid these swap space discussions.  I
wonder if there's something they aren't telling us. :^)

-- 
Brian E. Saunders                  saunders@castor.che.wisc.edu



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
       [not found] <3nrief$366@tenebris.rutgers.edu: <saunders-2904951815390001@caspar.che.wisc.edu: <3o34dd$41o@tenebris.rutgers.edu>
  1995-05-02  4:00 ` swap space warning Brian Saunders
@ 1995-05-03  4:00 ` Eric Osborne
  1995-05-03  4:00 ` Peter da Silva
  1995-05-04  4:00 ` George Chaltas
  3 siblings, 0 replies; 15+ messages in thread
From: Eric Osborne @ 1995-05-03  4:00 UTC (permalink / raw)


You may want to look at the settings of some kernal parameters. Ubcmaxpercent
and ubcborrowpercent are a couple of good ones - they control the size of
the unified buffer cache. There's also a parameter called ubcminpercent, I
think. I believe that you'll also find one called bufcache, which controls
the initial size of the buffer cache.  Since you have 1GB of ram, the defaults
for these things are setting your buffer cache at 100MB at system startup,
and it grows from there.  It can consume all of memory on a disk intensive
system, and result in paging.

The assumption that you need 2X memory for swap is an interesting piece of
lore - what you really need is enough swap to avoid running out of VM. You
will use less real memory if you have the system set to "lazy" evaluation
(remove /sbin/swapdefault).  If carefully tuned, the system need NEVER
swap if you have enough ram.  If you do swap, and you run out of swap space
in "lazy" mode, things can get ugly.  For what it's worth, I worked for some
months on a multiprocessor 7000 series machine with 8GB of memory and only
a couple of hundred megs of swap space - once tuned, the machine NEVER swapped
with the application load we had.  The performance was awesome.

By the way, check out the sysconfig and sysconfigdb commands - you don't have
to rebuild the kernel to set this stuff. That's a really nice feature of
Digital UNIX.  Oh, before I forget, the AdvFS maintains its own, separate
buffer cache.  Check the settings on that, too, if you are using AdvFS.

Hope that helps.

Eric Osborne




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
  1995-05-02  4:00 ` swap space warning Brian Saunders
@ 1995-05-03  4:00   ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
  1995-05-03  4:00     ` Brian Saunders
  0 siblings, 1 reply; 15+ messages in thread
From: Alan Rollow - Dr. File System's Home for Wayward Inodes. @ 1995-05-03  4:00 UTC (permalink / raw)



In article <saunders-0205951156200001@caspar.che.wisc.edu>, saunders@castor.che.wisc.edu (Brian Saunders) writes:
>
>It's funny how Digital employees avoid these swap space discussions.  I
>wonder if there's something they aren't telling us. :^)

One of the most common questions asked about DEC OSF/1 (the older
versions), is what the 10% warning means.  There are so many people
that know the stock answer, that we don't need to post about it.
It may not be so much "avoid", but that its been answered by someone
else by the time one of us sees it.

If I'm reading news from home, I may answer the question directly
to the person asking because I don't have all the rn pieces needed
to post follow-ups, but mail I can do.

Swap space usage problem seemed to be far more common on older
versions of DEC OSF/1 (V1.2, V1.3).  V1.3 is nearly three years
old now and been replaced by V2.0, V2.1, V3.0 and now V3.2.  Since
some of the swap space short problem were particular to how V1.2
and V1.3 allocated space, these problems are long gone in the
current versions.

Maybe the 10% warning message needs a good explaination note
in the FAQ, if doesn't already have one.
>
>-- 
>Brian E. Saunders                  saunders@castor.che.wisc.edu
>
--
Alan Rollow				alan@nabeth.cxo.dec.com




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
       [not found] <3nrief$366@tenebris.rutgers.edu: <saunders-2904951815390001@caspar.che.wisc.edu: <3o34dd$41o@tenebris.rutgers.edu>
  1995-05-02  4:00 ` swap space warning Brian Saunders
  1995-05-03  4:00 ` Eric Osborne
@ 1995-05-03  4:00 ` Peter da Silva
  1995-05-03  4:00   ` Brian Saunders
  1995-05-04  4:00 ` George Chaltas
  3 siblings, 1 reply; 15+ messages in thread
From: Peter da Silva @ 1995-05-03  4:00 UTC (permalink / raw)


In article <3o34dd$41o@tenebris.rutgers.edu>,
George Armhold <armhold@tenebris.rutgers.edu> wrote:
> Eager swap mode, with swapdefault pointing to the 196MB swap
> partition.

Then you will get warnings when the 196MB gets below 10%.

I would suggest pointing it to the big one.
-- 
Peter da Silva                                            `-_-'
Network Management Technology Incorporated                 'U`
1601 Industrial Blvd.     Sugar Land, TX  77478  USA
+1 713 274 5180                                "Har du kramat din varg idag?"



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
  1995-05-03  4:00 ` Peter da Silva
@ 1995-05-03  4:00   ` Brian Saunders
  0 siblings, 0 replies; 15+ messages in thread
From: Brian Saunders @ 1995-05-03  4:00 UTC (permalink / raw)


In article <id.E9KJ1.GMC@nmti.com>, peter@nmti.com (Peter da Silva) wrote:

> In article <3o34dd$41o@tenebris.rutgers.edu>,
> George Armhold <armhold@tenebris.rutgers.edu> wrote:
>> Eager swap mode, with swapdefault pointing to the 196MB swap
>> partition.

> Then you will get warnings when the 196MB gets below 10%.

That makes no sense, and it cannot be true.  In fact, I had a system today
that used up 100% of the default swap partition, and 50% of the secondary
swap partition.  We never got a warning, and shouldn't have.

-- 
Brian E. Saunders                  saunders@castor.che.wisc.edu



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
  1995-05-03  4:00   ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
@ 1995-05-03  4:00     ` Brian Saunders
  0 siblings, 0 replies; 15+ messages in thread
From: Brian Saunders @ 1995-05-03  4:00 UTC (permalink / raw)


In article <3o8jna$ami@nntpd2.cxo.dec.com>, alan@nabeth.cxo.dec.com (Alan
Rollow - Dr. File System's Home for Wayward Inodes.) wrote:

> It may not be so much "avoid", but that its been answered by someone
> else by the time one of us sees it.

Ah, I see. :^)

> Maybe the 10% warning message needs a good explaination note
> in the FAQ, if doesn't already have one.

Like that would do any good. :^)

-- 
Brian E. Saunders                  saunders@castor.che.wisc.edu



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
  1995-04-28  4:00 George Armhold
  1995-04-29  4:00 ` Brian Saunders
@ 1995-05-03  4:00 ` Daniel S. Riley
  1995-05-04  4:00   ` George Armhold
  1995-05-04  4:00 ` Daniel S. Riley
  2 siblings, 1 reply; 15+ messages in thread
From: Daniel S. Riley @ 1995-05-03  4:00 UTC (permalink / raw)



In article <3o34dd$41o@tenebris.rutgers.edu>,
armhold@tenebris.rutgers.edu (George Armhold) writes:
armhold> We have a Sable 2100 with 1 GB of real memory.  It's
armhold> configured with 196MB swap on it's primary disk, and 1GB swap
armhold> on a second disk.  I keep getting syslog (I assume it's
armhold> syslog) warnings: "swap space below 10 percent free", when
armhold> there is really plenty of swap space available, as shown by
armhold> vmstat and top.

What does 'swapon -s' say when this happens?  I don't really trust
vmstat or top to report swap utilization.

By the way, your 1 GB of swap is not going to get much use.  Your
system isn't going to page until physical memory is used up, but since
you only have as much swap as physical memory (and are using eager
allocation mode), you will run out of swap as soon as physical memory
fills up!  If this system is being used for a small number of very
memory intensive jobs, I would switch it to lazy swap allocation.

By the way (2), your article arrived here with the References: line
mangled like so:

	References: <3nrief$366@tenebris.rutgers.edu: <saunders-2904951815390001@caspar.che.wisc.edu:

with the trailing '>' on the message ID's changed to ':' (a little
careless with the global search and replace?).  This breaks automated
reference chasing, which is why I'm replying to your followup, not the
original message...

-- 
Dan Riley                          Internet:  dsr@lns598.lns.cornell.edu
Wilson Lab, Cornell University     HEPNET/SPAN: lns598::dsr (44630::dsr)
	      "Distance means nothing/To me." -Kate Bush



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
       [not found] <3nrief$366@tenebris.rutgers.edu: <saunders-2904951815390001@caspar.che.wisc.edu: <3o34dd$41o@tenebris.rutgers.edu>
                   ` (2 preceding siblings ...)
  1995-05-03  4:00 ` Peter da Silva
@ 1995-05-04  4:00 ` George Chaltas
  1995-05-10  4:00   ` Siggy Hensel
  3 siblings, 1 reply; 15+ messages in thread
From: George Chaltas @ 1995-05-04  4:00 UTC (permalink / raw)


armhold@tenebris.rutgers.edu (George Armhold) wrote:
>
 
> Eager swap mode, with swapdefault pointing to the 196MB swap
> partition. The general "rule of thumb" in swap space allocation is 2 X
> phys mem, however given that we have 1GB of real memory we don't
> really expect to need a 2GB address space (then again, ...)  I could
> increase the swap space, however I don't think this will solve the
> problem since we're seeing the messages well before we're at the 10
> percent level.  My guess is that whatever generates the warnings isn't
> considering the fact that swap is spread out over two devices.
> 
> Oh, and I forget to mention in my original posting that this was with
> OSF/1 3.2.
> 
> -George


Something doesn't seem to be set up correctly.  The system thinks
it's nearly out of swap, whereas you think you have plenty.  Have
you checked to be sure that the system sees your secondary swap
disk?  Check the output of this command:

/sbin/swapon -s

It should list each swap partition separately, and then the
total available.  If it doesn't list your second swap partition,
then it isn't being used -- check /etc/fstab to see if the second
swap partition is correctly listed.   If it is, check and see if
the disk is online. 

You can also add the second swap partition on the fly, as follows
(assume that you're adding /dev/rz3c as a swap partition):

/sbin/swapon /dev/rz3c


			George Chaltas



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
  1995-05-03  4:00 ` Daniel S. Riley
@ 1995-05-04  4:00   ` George Armhold
  0 siblings, 0 replies; 15+ messages in thread
From: George Armhold @ 1995-05-04  4:00 UTC (permalink / raw)


dsr@lns598.lns.cornell.edu (Daniel S. Riley) writes:

> By the way, your 1 GB of swap is not going to get much use.  Your
> system isn't going to page until physical memory is used up, 

Huh?  It's set to eager swap mode- and therefore allocates a page of
swap for every page of real memory allocated.

> but since you only have as much swap as physical memory (and are
> using eager allocation mode), you will run out of swap as soon as
> physical memory fills up!  

No, I said I have two swap partitions, the first (primary) is 196MB
and the second is 1GB.  So the total swap is 1220MB.

> By the way (2), your article arrived here with the References: line
> mangled like so:

>	References: <3nrief$366@tenebris.rutgers.edu: <saunders-2904951815390001@caspar.che.wisc.edu:

> with the trailing '>' on the message ID's changed to ':' (a little
> careless with the global search and replace?).  This breaks automated
> reference chasing, which is why I'm replying to your followup, not the
> original message...

Yes, my fault.  Our newsposting software has a "feature" that rejects
articles with too much quoted text and not enough new information.

-George

--
         HyperComputing and Design group @ Rutgers University
                 Internet: armhold@cs.rutgers.edu
                    BITNET: armhold@PISCES.BITNET
                 http://www.cs.rutgers.edu/~armhold



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
  1995-04-28  4:00 George Armhold
  1995-04-29  4:00 ` Brian Saunders
  1995-05-03  4:00 ` Daniel S. Riley
@ 1995-05-04  4:00 ` Daniel S. Riley
  1995-05-05  4:00   ` George Armhold
  2 siblings, 1 reply; 15+ messages in thread
From: Daniel S. Riley @ 1995-05-04  4:00 UTC (permalink / raw)



dsr@lns598.lns.cornell.edu (Daniel S. Riley) writes:
dsr> By the way, your 1 GB of swap is not going to get much use.  Your
dsr> system isn't going to page until physical memory is used up,

In article <3oarvj$696@tenebris.rutgers.edu>
armhold@tenebris.rutgers.edu (George Armhold) writes:
armhold> Huh?  It's set to eager swap mode- and therefore allocates a
armhold> page of swap for every page of real memory allocated.

Yes, it allocates a page of backing store for every page of real
memory--my point is that it hardly ever uses it.  It won't actually
page until it runs out of memory, and there's only a narrow region
where it is out of memory and still has swap available.  You have a GB
of disk that is being used by the VM system for bookkeeping purposes
but is almost never written to or read.

dsr> but since you only have as much swap as physical memory (and are
dsr> using eager allocation mode), you will run out of swap as soon as
dsr> physical memory fills up!  

armhold> No, I said I have two swap partitions, the first (primary) is
armhold> 196MB and the second is 1GB.  So the total swap is 1220MB.

So you have a narrow region between 1GB and 1.2GB where the system
does page, doing some reads and writes to the swap partition.  I
suppose the system will page somewhat before the 1 GB point due to the
file system buffer cache, but I am still unconvinced that your swap
configuration makes sense.  (Of course, none of this directly
addresses your real problem with the apparently bogus low swap space
warnings.)

-- 
Dan Riley                          Internet:  dsr@lns598.lns.cornell.edu
Wilson Lab, Cornell University     HEPNET/SPAN: lns598::dsr (44630::dsr)
	      "Distance means nothing/To me." -Kate Bush



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
  1995-05-04  4:00 ` Daniel S. Riley
@ 1995-05-05  4:00   ` George Armhold
  0 siblings, 0 replies; 15+ messages in thread
From: George Armhold @ 1995-05-05  4:00 UTC (permalink / raw)


dsr@lns598.lns.cornell.edu (Daniel S. Riley) writes:

>armhold> No, I said I have two swap partitions, the first (primary) is
>armhold> 196MB and the second is 1GB.  So the total swap is 1220MB.

>So you have a narrow region between 1GB and 1.2GB where the system
>does page, doing some reads and writes to the swap partition.  I
>suppose the system will page somewhat before the 1 GB point due to the
>file system buffer cache, but I am still unconvinced that your swap
>configuration makes sense.  (Of course, none of this directly
>addresses your real problem with the apparently bogus low swap space
>warnings.)

Ok, I misunderstood your earlier posting.  I considered 196MB of VM
beyond the 1GB of real mem a "cushion" of sorts.  Of course now I
regularly have users pushing the 1GB boundary (the axiom "the steady
state of a disk is 'full'" comes to mind...)  I'm going to try
switching over to deferred allocation tonight and try that for a
while.

Others have posted mentioning to try monitoring the swap space with
swapon and indeed both partitions are being used.  

-George

--
         HyperComputing and Design group @ Rutgers University
                 Internet: armhold@cs.rutgers.edu
                    BITNET: armhold@PISCES.BITNET
                 http://www.cs.rutgers.edu/~armhold



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: swap space warning
  1995-05-04  4:00 ` George Chaltas
@ 1995-05-10  4:00   ` Siggy Hensel
  0 siblings, 0 replies; 15+ messages in thread
From: Siggy Hensel @ 1995-05-10  4:00 UTC (permalink / raw)


In article <3oan6r$atq@mrnews.mro.dec.com>,
George Chaltas  <chaltas@fluid.mro.dec.com> wrote:
>
>You can also add the second swap partition on the fly, as follows
>(assume that you're adding /dev/rz3c as a swap partition):
>
>/sbin/swapon /dev/rz3c
>
>			George Chaltas


Can you swap safely to a 'c' partition ?????!!!

I think the disklabel will be destroyed if the swapping 
happens to overwrite the first disk sectors.

Therefore I always create at least a dummy 'a' partition 
with about 1 Megabyte to hold the disklabel.

Can someone please comment on that?
-- 
Siggy Hensel    < siggy@aed-graphics.de >



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~1995-05-10  4:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3nrief$366@tenebris.rutgers.edu: <saunders-2904951815390001@caspar.che.wisc.edu: <3o34dd$41o@tenebris.rutgers.edu>
1995-05-02  4:00 ` swap space warning Brian Saunders
1995-05-03  4:00   ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
1995-05-03  4:00     ` Brian Saunders
1995-05-03  4:00 ` Eric Osborne
1995-05-03  4:00 ` Peter da Silva
1995-05-03  4:00   ` Brian Saunders
1995-05-04  4:00 ` George Chaltas
1995-05-10  4:00   ` Siggy Hensel
1995-04-28  4:00 George Armhold
1995-04-29  4:00 ` Brian Saunders
1995-05-01  4:00   ` George Armhold
1995-05-03  4:00 ` Daniel S. Riley
1995-05-04  4:00   ` George Armhold
1995-05-04  4:00 ` Daniel S. Riley
1995-05-05  4:00   ` George Armhold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox