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

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

Post by droul.. » Fri, 10 May 1996 04:00:00



About swap space,
If I upgrade memory from 16Meg to 32 Meg, do I really have to double the swap
space. What are going to be the results if I don't?
Is swap space in SCO only swap space or is it consider virtual memory (as in windows)?
What happen to a system if it has 32 MB Ram and only 24 MB swap space?
Thanks

______________________________________________________________


  Administrateur Systemes                                  Systems Administrator
  Systeme de Marche Boursier                          Exchange Market Systems
  E.M.S                                                                        Montreal, Canada
______________________________________________________________

 
 
 

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

Post by Steven Thompso » Sun, 12 May 1996 04:00:00



>About swap space,
>If I upgrade memory from 16Meg to 32 Meg, do I really have to double the swap
>space. What are going to be the results if I don't?
>Is swap space in SCO only swap space or is it consider virtual memory (as in windows)?
>What happen to a system if it has 32 MB Ram and only 24 MB swap space?
>Thanks

Yes, you should definitely increase your swap space.  Actually you should have
a swap area of 1.5 times the amount of RAM on the system.  If you have 32 meg,
your swap should be at least 48 meg.  If you don't, then you will have a system
that operates inefficiently.
If you have less swap area than memory, the system cannot efficiently swap
processes as it cannot move entire blocks to the swap area.  So you start a
process, memory is full the system needs to swap an inactive process so that
it can move your active process into memory.  There's insufficient swap area
to move the entire process, it only moves out part of physical memory to swap
and loads as much of your process as it can, then it must continually do disk
reads and writes to move the active process into memory.  With sufficient swap,
the entire inactive process is moved out, the active process is moved into
real memory and disk access is minimized.
Virtual memory or swap space?  Well yes it is virtual memory and yes it is swap
space.  It is virtual memory as it is an extension of physical RAM but it is
virtual memory used for swapping processes.  Active processes only use physical
RAM.

 
 
 

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

Post by Lucky Leavel » Tue, 14 May 1996 04:00:00




> >About swap space,
> >If I upgrade memory from 16Meg to 32 Meg, do I really have to double the swap
> >space. What are going to be the results if I don't?
> >Is swap space in SCO only swap space or is it consider virtual memory (as in windows)?
> >What happen to a system if it has 32 MB Ram and only 24 MB swap space?
> >Thanks

> Yes, you should definitely increase your swap space.  Actually you should have
> a swap area of 1.5 times the amount of RAM on the system.  If you have 32 meg,
> your swap should be at least 48 meg.  If you don't, then you will have a system
> that operates inefficiently.

Steve,
   I ran across a similar situation when upgrading from OSE 3.0 to OSR5.
I have a 486-50 with 16MB RAM so I started out with 32MB swap but kept
getting error messages indicating I was out of swap space.  I used the
swap command to add another 16 MB (48 total) swap though 40MB would have
probably worked OK.  When I replaced hd0 with a 1Gb, I chose a fresh
install of OSR5 and, since I had HD space to burn, increased my swap
partition to 72MB (just  in case I do upgrade to 24 or 32MB RAM).

   Anyway, it would appear that 2-1/2 or 3X RAM for small memory systems
would be more like it for OSR5. (Perhaps that is due to my running an
Ingres RDBMS dev system or something.)

Regards,
Lucky

Lucky Leavell                            Phone: (812) 945-6555
Relational Information Systems, Inc.       FAX: (812) 949-9233

New Albany, IN 47150-2013                       71534,2674 (CompuServe)
WWW Home Page:  http://www.iglou.com/ris   ftp://www.iglou.com/members/ris

 
 
 

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

Post by Stephen M. Du » Wed, 22 May 1996 04:00:00


$About swap space,
$If I upgrade memory from 16Meg to 32 Meg, do I really have to double the swap
$space. What are going to be the results if I don't?
$Is swap space in SCO only swap space or is it consider virtual memory (as in windows)?
$What happen to a system if it has 32 MB Ram and only 24 MB swap space?

   RTFFAQ for some information.  You can certainly run a system with
32 MB of physical RAM and 24 MB of swap.  If your system panics, it
will be unable to write a complete dump image (unless you've told it
to dump somewhere other than /dev/swap).

   Also, SCO Unix likes to err on the side of safety when it comes to
memory allocation.  If you wish to allocate a chunk of user memory,
even if your system is not swapping, there must be at least that much
swap space free or the request will fail, regardless of how much physical
memory is free.  The reason is that it's possible that at some time
in the future, _everything_ you've allocated may have to be swapped
out, so the system makes sure it never allocates more memory than
exists swap space.  This is an oversimplification; for example, code
pages which can simply be discarded and then paged back in from the
binary don't require corresponding swap space.
--

----------------------------------------------------------------------------
Manager, Technical Services                     United System Solutions Inc.
104 Carnforth Road, Toronto, ON, Canada M4A 2K7          (416) 750-7946 x251

 
 
 

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

Post by Simon Hobs » Fri, 24 May 1996 04:00:00




> About swap space,
> If I upgrade memory from 16Meg to 32 Meg, do I really have to double the swap
> space. What are going to be the results if I don't?
> Is swap space in SCO only swap space or is it consider virtual memory (as in
> windows)?
> What happen to a system if it has 32 MB Ram and only 24 MB swap space?

There is another aspect that no-one else seems to have raised - that you
can run out of swap space without the system ever using it (I know, we did,
and I couldn't understand why).

I cannot better this explanation of why you need as much swap as is stated
....

TTFN, Simon

> > Newsgroups: comp.unix.sco.programmer

> > Subject: Re: Adding Memory

> > Organization: Microlise Engineering Ltd.


> > X-Newsreader: IBM NewsReader/2 v1.2


> > Davis) writes:
> > >Please explain further- how can not having 2x RAM in swap prevent using
> > >all of RAM?  I don't understand....

> > ok, I'll bite... (apologies in advance for a long lecture - I hope I get
> > this all right... :-)

> > Most Unixes (SCO included), think something like this:

> > "I've got X megs of user RAM, and Y megs of swap, so I'll let applications
> > allocate up to X+Y-(possible safety margin) megs of *virtual memory
> > space*".

> > Now this is easy to understand if you think in terms of the memory space
> > that the programs use as actually existing and therefore taking up either
> > RAM or swap.

> > But programs almost always have virtual space allocated that is *not*
> > backed up by RAM or swap; in fact there are three main reasons why:

> >   - fork()

> >       The parent and child process will share *one* copy of a physical
> >       page between *two* *separate* virtual address spaces - until either
> >       of them modifies the page;

> >   - sbrk(), malloc() etc

> >       Newly-allocated memory is created as demand-zero pages - they have
> >       no physical existence until they are touched for the first time;

> >   - file mapping

> >       Program code and static data (and mmap() on files, on Unixes that
> >       allow that) are backed by the file itself - they are not read in
> >       from the filesystem until they are faulted on, and can be discarded
> >       without being paged out if they have not been modified. They
> >       therefore may not be taking up any RAM or swap.

> > So a system may have much more virtual memory space in use than can be
> > determined by just looking at the amount of RAM and swap in use.

> > For example, right now, on one of our development boxes:

> > Physical RAM in use:     10416k
> > Swap space in use:        8128k
> > Demand-zero pages:       11952k
> > File-mapped pages:        3756k
> > Copy-on-write pages:       584k
> >                          ------
> > Virtual space allocated: 34836k

> > Now, if this system had 16M (user) RAM and 20M swap, it might not be
> > showing much paging activity, and 8M swap used out of 20M hardly seems like
> > cause for concern, but since it thinks that the virtual address space is
> > almost exhausted (36M available, 34M allocated) it might start to refuse
> > requests to allocate memory; since it might, after all, be called on to
> > provide RAM or swap to back up all those demand-zero, file-mapped and
> > copy-on-write pages and wants to be able to do so. So fork() might fail,
> > malloc()/sbrk() might fail, and execve() might get SIGKILL signals since
> > these are the main ways in which virtual space is allocated.

> > [In fact, that machine has 32M RAM and 80M swap, so it is running fine.
> > Also, note that the '2x RAM' figure is just a rule of thumb - I tend to
> > use more than that since a few meg of disc space is usually neither here
> > nor there - but reorganising swap space after the fact can get terribly
> > time-consuming...]

> > Warning signs that show you have not enough swap:

> >    1. Programs complain about inability to allocate memory.
> >        [Note: this can also be due to exceeding process size limits.]
> >    2. You type a command and get 'Fork failed' or some such error.
> >        [Note: this can also be due to exceeding kernel limits.]
> >    3. You type a command and get only the response 'Killed'.
> >        [I don't think there are any other causes for this.]

> > In case you were wondering, execve() gets SIGKILL rather than return an
> > error because (one assumes) the virtual memory shortage is not detected
> > until after the old memory image is discarded, so there is no program
> > left to return the error code to...

> > Aside: Some other Unixes, notably AIX, take the opposite view, and say
> > "I'll let the applications allocate as much virtual memory as they want -
> > after all they probably won't access all of it". This approach has the
> > advantage of requiring less swap space, but leaves the system in a bit of
> > a mess when it finds that it has overcommitted the available resources -
> > AIX in these circumstances has a tendency to kill processes to free up
> > memory....

> > ====


 
 
 

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

Post by Bill Vermilli » Tue, 28 May 1996 04:00:00






>> About swap space,
>> If I upgrade memory from 16Meg to 32 Meg, do I really have to double the swap
>> space. What are going to be the results if I don't?
>> Is swap space in SCO only swap space or is it consider virtual memory (as in
>> windows)?
>> What happen to a system if it has 32 MB Ram and only 24 MB swap space?
>There is another aspect that no-one else seems to have raised - that you
>can run out of swap space without the system ever using it (I know, we did,
>and I couldn't understand why).
>I cannot better this explanation of why you need as much swap as is stated
>....

Depending on the design of the OS - mainy Unix variants allocate
swap space upon start up of the program - particulary for the
data and stack.   The is 'allocation' - not used when started
but reserved so it will be there when needed.  The concept is
to be able to have it available when you need - instead of
crashing the program for lack of swap.  This method means you can run
out of swap without ever using it.

I don't know if SCO uses this scheme or not.

--

 
 
 

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

Post by SkyNot » Wed, 05 Jun 1996 04:00:00


It is virtual memory

 
 
 

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. How do Dual Boot with NT and Linux??

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

4. C-Kermit 6.0 AIX binaries needed

5. Allocated swap space versus used swap space

6. Q: X11 programming (newbie)

7. Question about virtual swap space and a memory monitor

8. gcc 2.7.2.3 problem when compiling kernel 2.2.6

9. Swap space and virtual memory

10. Swap memory , RAM memory and available space disk on a Sun MicroSystem under Solaris 2.6 ?

11. Linux HardDrive Space Reqs, Swap Space

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