Will Dyson on 24 Nov 2003 13:28:02 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Why am I running out of memory?


On Mon, 2003-11-24 at 12:21, gabriel rosenkoetter wrote:
> On Mon, Nov 24, 2003 at 10:47:20AM -0500, Walt Mankowski wrote:
> > Why doesn't the kernel just swap out some of my process before asking
> > for more memory?  Are there any techniques I can use to make sure the
> > kernel has enough physical memory for itself?
> 
> The kernel can't swap out a process that's running, Walt, and it's
> got no heuristic for which of that process's pages are in use.

Actually, the kernel will evict userspace _pages_ on a LRU basis. It
doesn't care about the state of the processes owning the pages. Pages
that are part of a shared library or multiply mmap()ed file have no
definitive process that owns them.

-- 
Will Dyson
"Back off man, I'm a scientist!" -Dr. Peter Venkman

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug