From owner-freebsd-questions@FreeBSD.ORG Tue Oct 28 13:01:50 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94F392B9 for ; Tue, 28 Oct 2014 13:01:50 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CE298EB for ; Tue, 28 Oct 2014 13:01:50 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id ex7so9240295wid.6 for ; Tue, 28 Oct 2014 06:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=nCUXzJ+8IpW3eIk3JM5N1xed1b/f5acPHE3Kuy9T8VA=; b=NahHIy5QXBoYI5rSK1zYVzhoeV6FHrtcfZjQNj+vrqTR580Qyc8562+7GgMl5mLkau Moa7Rnbrtz87OuRHw56ODSyHD5qA24P6dVH7xc3San7VuaOzh7chpocRDaNhCnCUvxnx sB+93MT3qvg7mQe3MK62Q4vo8gvytL7mitbESKXjrZ+mMYde06jagqq1pvTKe5Ve+UIg PaoJHY64nHtiHvbAWFqs2OOYzejd7nhd6zmBJEcI/2IZPdAOb1SXkLcqhqtAZZS5Tr44 UNDTQue+P1v95SsMtKFc5ig4kjFR6R+3c1x6ekjkNr8cmn5lt0A6LHIJ3OWlgLHDOaUe WSKA== X-Received: by 10.180.8.233 with SMTP id u9mr4636462wia.19.1414501308494; Tue, 28 Oct 2014 06:01:48 -0700 (PDT) Received: from gumby.homeunix.com (5ec1f671.skybroadband.com. [94.193.246.113]) by mx.google.com with ESMTPSA id pn4sm1759921wjc.38.2014.10.28.06.01.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Oct 2014 06:01:47 -0700 (PDT) Date: Tue, 28 Oct 2014 13:01:46 +0000 From: RW To: freebsd-questions@freebsd.org Subject: Re: out of swap space Message-ID: <20141028130146.6d2b6179@gumby.homeunix.com> In-Reply-To: References: <0fdf2022075b7a33f0abde4edd7c12a1@paz.bz> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2014 13:01:50 -0000 On Mon, 27 Oct 2014 16:39:52 -0500 Adam Vande More wrote: > On Mon, Oct 27, 2014 at 2:57 PM, Jim Pazarena wrote: > > > There is a lot of historical chatter about the amount of swap space > > required. > > But for my question, I haven't seen discussion: > > What HAPPENS when the system flags "out of swap space". > > Does a process die? or does the system merely become very sluggish? > > > > Both, a process is killed and whenever you're starting to use swap > space you should expect the system to become sluggish. I don't know that anything bad happens simply because you run out of swap. Processes are killed when the system is unable to find enough memory to carry on. For example if you have 4GB of RAM and 1GB of swap, and you leave 2GB on tmpfs, you may fill swap without even coming close to running out of memory. Another example is a very slow memory leak where running out of memory could happen a long time after running out of swap. There seems to be a common trend of allocating swap space that's much smaller than RAM. When you combine that with tmpfs use, I suspect it may have become much more common to run out of swap without consequences.