* Alpha OSF/1 : swap space problems
@ 1994-12-19 18:44 Michael E. Warren
1994-12-19 21:48 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
0 siblings, 1 reply; 2+ messages in thread
From: Michael E. Warren @ 1994-12-19 18:44 UTC (permalink / raw)
For an Alpha running OSF/1:
Can someone explain how swap space and memory is allocated/deallocated? I've
got a system of processes, all fairly memory and cpu intensive. They seem to
work fine for several minutes after startup and then the operating system
starts killing them off for lack of swap space. I've checked for memory leaks
by hand but don't see any. Are there any free tools out that would help find
them, if they exist? Any other ideas about what could be wrong?
Our system administrator says it's setup to do "lazy" swap.
Mike Warren
HRB Systems
State College, PA
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Alpha OSF/1 : swap space problems
1994-12-19 18:44 Alpha OSF/1 : swap space problems Michael E. Warren
@ 1994-12-19 21:48 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
0 siblings, 0 replies; 2+ messages in thread
From: Alan Rollow - Dr. File System's Home for Wayward Inodes. @ 1994-12-19 21:48 UTC (permalink / raw)
In article <1994Dec19.134407.22556@hrbicf>, m1w@icf.hrb.com (Michael E. Warren) writes:
>
>For an Alpha running OSF/1:
>
>Can someone explain how swap space and memory is allocated/deallocated? I've
>got a system of processes, all fairly memory and cpu intensive. They seem to
>work fine for several minutes after startup and then the operating system
>starts killing them off for lack of swap space. I've checked for memory leaks
>by hand but don't see any. Are there any free tools out that would help find
>them, if they exist? Any other ideas about what could be wrong?
There are two schemes for page/swap space allocation. Call them
eager and lazy. Using eager space allocation, the virtual code
reserves page/swap space for a process whenever its virtual memory
requirements expand. This ensures that if a process does need to
page or swap that the space is available to it. Assignment of
space to the pages needing to it, is delayed until they are paged
out the first time. The disadvantage of this method is that
the system's virtual memory is limited the amount of page/swap
space available.
With the lazy scheme, no reservation is made and when a process
needs to be swapped or have some of its pages written out, the
space is allocated. If there isn't enough space, then the kernel
starts selecting processes to be killed to make space. It prefers
"idle" processes, but in exteme conditions, anything but the process
itself will look "idle".
The advantage of this scheme is that limit on virtual memory for
the system is the sum of physical memory and the page/swap space
rather than just the page/swap space. If you can accurately
predict the virtual memory needs of a process load and ensure
that limit won't be exceeded, it lets you size the balance between
page space and physical memory reasonably.
The disadvantage is the one you've seen. If your virtual
memory requirements exceed the system's capacity, then processes
will die. It sounds like you have one of those "extreme"
conditions where everything starts to look idle.
In V1.2 and V1.3 a doubling scheme was used for virtual memory
allocation. A process would start out at some reasonably small
value and when more virutal memory was needed the previous size
would be doubled.
So, if a process started out needing 1 MB and then needed more,
2 MB would be allocated. If more was needed again, it would use
4 MB. Berkeley used a similar scheme, but it had an upper bound
where it wouldn't double anymore. I'm not sure OSF/1 had the
upper bound. I also don't know if the initial allocation of
virtual memory used the same scheme. If so, processes using
large amounts of virtual memory could be trying allocate obscene
amounts of virtual memory. This misfeature was fixed in V2.0.
In V1.2 actual space allocations wouldn't be interleaved among
multiple devices, but this was fixed in V1.3.
As with most UNIX systems, malloc/free manage space for the
calling process and free merely makes the space available to
malloc and not the system. A program that has a high short
term dynamic memory need will use up a bunch of space that
it may not need in normal use, but can't give back.
>
>Mike Warren
>HRB Systems
>State College, PA
>
>
--
Alan Rollow alan@nabeth.cxo.dec.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1994-12-19 21:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-12-19 18:44 Alpha OSF/1 : swap space problems Michael E. Warren
1994-12-19 21:48 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox