Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* bogus swap space rule-of-thumb (was Re: UDB ( adding memory ))
@ 1997-04-13  9:57 Eric Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Smith @ 1997-04-13  9:57 UTC (permalink / raw)


V2
T861019790
K861026331
N3
P212886
I8/2/60948
MDeferred: Network is unreachable
Fr
$rinternal
$slocalhost
$_localhost
SMAILER-DAEMON
RPF:<sky1@savetrees.com>
H?P?Return-Path: <MAILER-DAEMON>
HReceived: from localhost (localhost)
          by lacrosse.redhat.com (8.8.4/8.8.4) with internal
	  id IAA22268; Mon, 14 Apr 1997 08:09:50 -0400
H?D?Date: Mon, 14 Apr 1997 08:09:50 -0400
H?F?From: Mail Delivery Subsystem <MAILER-DAEMON>
H?x?Full-Name: Mail Delivery Subsystem
H?M?Message-Id: <199704141209.IAA22268@lacrosse.redhat.com>
HTo: <sky1@savetrees.com>
HMIME-Version: 1.0
HContent-Type: multipart/report; report-type=delivery-status;
	boundary="IAA22268.861019790/lacrosse.redhat.com"
HSubject: Returned mail: Insufficient permission: Error 0
HAuto-Submitted: auto-generated (failure)
.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: bogus swap space rule-of-thumb (was Re: UDB ( adding memory ))
@ 1997-04-13 12:54 Christopher B. Browne
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher B. Browne @ 1997-04-13 12:54 UTC (permalink / raw)


> > For Linux/x86 twice the memsize is recommended for swap. I believe that
> > this is generally assumed to be valid for axp as well, but I doubt if
> > anyone ever investigated this.
> 
> Gee, so on my Intel box which has 192M of physical RAM, I should have
> 384M of swap?  And on my Alpha with 88M of RAM I should have 176M of swap?
> I don't think so.
> 
> The problem with this sort of rule of thumb is that it has no objective
> basis.  The fact that I have x megabytes of physical memory doesn't in any
> way suggest that I need 3x megabytes of virtual.

On the contrary, there is an objective basis.  Just not for Linux.

BSD variants have long required that swap be at least twice the size of 
physical RAM.  This allowed kernel memory allocation code to make certain 
assumptions (that I don't recall).

At one time, the Linux kernel may have laboured under similar assumptions, but 
that's definitely not been true for several years; swap>2*real was not 
required when I first installed 1.0.9 back in 1994.  At that time, the 
limitation I had was that I couldn't have swap partitions *larger* than 
2*real, because I had 8MB of RAM, and Linux only supported 16MB swap 
partitions.  The limits have, of course, grown since then.

--
Christopher B. Browne, cbbrowne@unicomp.net, chris_browne@sdt.com
Web: http://www.conline.com/~cbbrowne  SAP Basis Consultant, UNIX Guy
Windows NT - How to make a 100 MIPS Linux workstation perform like an 8 MHz 286

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: bogus swap space rule-of-thumb (was Re: UDB ( adding
@ 1997-04-14 16:19 Przemek Klosowski
  1997-04-14 17:02 ` bogus swap space rule-of-thumb (was Re: UDB ( adding memory )) Andreas Kostyrka
  0 siblings, 1 reply; 3+ messages in thread
From: Przemek Klosowski @ 1997-04-14 16:19 UTC (permalink / raw)


>> For Linux/x86 twice the memsize is recommended for swap. I believe that
   >> this is generally assumed to be valid for axp as well, but I doubt if
   >> anyone ever investigated this.
   >

   >The problem with this sort of rule of thumb is that..

   You are right of course. BUT, as you said, it's just a "rule of thumb"
   Nobody else knows how much memory you are going to need for your purposes.

   I wonder if anyone has seen any work being done for Linux to use a
   "dynamic" swap of any useful kind? Soem OS's have implemeted this, to

Two comments: first, the disk access is still at most 5MB/sec for many
people, so if you put in 100MB swap, it takes at least 20 seconds to
actually use it (in other words if you truly use it, you are in trouble).

Secondly, it is possible to swap to a file, and turn on swapping on the fly:

	dd if=/dev/zero of=/tmp/swapfile bs=1k count=5000     (create a 50MB file)
	/sbin/mkswap /tmp/swapfile 5000      
	/sbin/swapon /tmp/swapfile

It is slower than swapping to a partition, but it's great in a pinch. I now
routinely set up 40MB swap regardless of the memory size (just to avoid getting
in a bind because 2MB of memory was missing), and rely on temp swap for short
term solution, and SIMM swap for long term :^)

			przemek klosowski <przemek@nist.gov>  (301) 975-6249
			NIST Center for Neutron Research (bldg. 235), E111 
			National Institute of Standards and Technology
			Gaithersburg, MD 20899,      USA

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

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

end of thread, other threads:[~1997-04-14 17:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-13  9:57 bogus swap space rule-of-thumb (was Re: UDB ( adding memory )) Eric Smith
  -- strict thread matches above, loose matches on Subject: below --
1997-04-13 12:54 Christopher B. Browne
1997-04-14 16:19 bogus swap space rule-of-thumb (was Re: UDB ( adding Przemek Klosowski
1997-04-14 17:02 ` bogus swap space rule-of-thumb (was Re: UDB ( adding memory )) Andreas Kostyrka

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