Help! Altos 5.3.1 fork is failing!
ka at cs.washington.edu
Mon Oct 23 17:22:39 AEST 1989
jerry at altos86.Altos.COM (Jerry Gardner) writes:
> You really are running out of swap space. Even though
> "swap -l" may show plenty of swap space remaining, it is misleading.
> UNIX allocates swap space for the entire .data and .bss regions whenever
> a process is exec'ed. Even though swap -l shows plenty of swap space
> available, most of the swap space is allocated to processes, which, although
> they may not currently be swapped out, still tie up the swap space.
Are you sure about this? This summer I was working on a project that
was running System V release 3.2 on machines with 10 megabytes of swap
and 8 megabytes of memory. We were getting messages in the error log
about getcpages failing and forks failing, so I looked at the code and
some sar output, and concluded:
- We were running out of virtual address space and doing a lot of
- The total amount of virtual memory that the system will allocate
to processes is bound by the *sum* of the physical memory and the
swap space. (This makes sense because a page can either be in
physical memory or on the swap device; there is no need for it
to be both places.)
So I had the amount of memory increased to 16 megabytes, and everything
worked fine. Of course this might not have worked with release 3.1.
> Your best solution: get more RAM. The 2000 in my office that I use as a
> single-user personal machine has 24MB. If you can't get more RAM, you could
> try a larger swap partition, but if your system is heavily loaded, it'll just
> thrash, constantly paging and swapping things in and out.
If the system is allocating swap space for pages that are in RAM, then
getting more RAM won't help the problem of running out of swap space.
But if I read the code correctly, then release 3.2 will not allocate swap
space for pages in RAM so adding more RAM will solve both the space
problem and the excessive paging rate.
All this assumes that the diagnosis of running out of swap space is
correct. I've never used "swap -l", but I've never had any reason to
doubt the output of sar. On the other hand, I've never tried to tune
a release 3.1 system. If Jim happens to have an unused partition on
his disk, he could easily see whether adding more swap space makes the
fork problem go away.
More information about the Comp.unix.i386