Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Apr 2005 11:45:36 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Nick Barnes <Nick.Barnes@pobox.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: kernel killing processes when out of swap
Message-ID:  <20050412164536.GB4842@dan.emsphone.com>
In-Reply-To: <51621.1113318561@thrush.ravenbrook.com>
References:  <20050412142640.GB1570@stack.nl> <51621.1113318561@thrush.ravenbrook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Apr 12), Nick Barnes said:
> This is the well-known problem with my fantasy world in which the OS
> doesn't overcommit any resources.  All those programs are broken, but
> it's too costly to fix them.  If overcommit had been resisted more
> effectively in the first place, those programs would have been
> written properly.

Another issue is things like shared libraries; without overcommit you
need to reserve the file size * the number of processes mapping it,
since you can't guarantee they won't touch every COW page handed to
them.  I think you can design a shlib scheme where you can map the libs
RO; not sure if you would take a performance hit or if there are other
considerations.  There's a similar problem when large processes want to
fork+exec something; for a fraction of a second you need to reserve 2x
the process's space until the exec frees it.  vfork solves that
problem, at the expense of blocking the parent until the child's
process is loaded.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050412164536.GB4842>