From owner-freebsd-questions@freebsd.org Thu Sep 17 18:52:20 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B9FD9CFCD2 for ; Thu, 17 Sep 2015 18:52:20 +0000 (UTC) (envelope-from bthcom@higonnet.net) Received: from freebsd.higonnet.net (higonnet.net [45.32.236.176]) by mx1.freebsd.org (Postfix) with ESMTP id E8BF71BE0 for ; Thu, 17 Sep 2015 18:52:19 +0000 (UTC) (envelope-from bthcom@higonnet.net) Received: from [192.168.1.102] (ARouen-151-1-34-109.w90-22.abo.wanadoo.fr [90.22.97.109]) by freebsd.higonnet.net (Postfix) with ESMTPA id 9DCFC2F1B5 for ; Thu, 17 Sep 2015 18:52:16 +0000 (UTC) Subject: Re: Constantly running out of swap space References: <55FAFEE4.5080701@higonnet.net> To: FreeBSD Questions From: Bernard Higonnet Message-ID: <55FB0BDF.1050605@higonnet.net> Date: Thu, 17 Sep 2015 20:52:15 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2015 18:52:20 -0000 I'll try that, but something in my bones make me skeptical. For the kind of traffic I have trouble seeing so many workers spinning their wheels at the same time... I think there's either something wrong with how I set up my swap space (highly likely) or a bug in swapping to a file in 10.2 (highly unlikely). Thnx Bernard Higonnet On 2015-09-17 20:16, Adam Vande More wrote: > On Thu, Sep 17, 2015 at 12:56 PM, Bernard Higonnet > wrote: > >> Using FreeBSD 10.2 >> >> I'm using a swap file set up as described at >> https://www.freebsd.org/doc/handbook/adding-swap-space.html >> >> No matter what size I make it (last time 4GB) I run out of swap space on a >> VPS with 768KB RAM. Space is being used by amavisd/clamd which is >> apparently notorious space hungry, but it's clear to me there's a problem >> somewhere. Everything works OK for a while (a few hours? on a system with >> very little traffic (100 emails a day...)) and then runs out of space. >> >> I assume amavisd/clamd are not using swap space explicitly and the OS >> decides on is own that swap space is needed >> > > Only the kernel controls VM, not userland. Userland tools can only make > requests. > > >> Any suggestions? >> > > If it was me, I'd remove any file backed swap you may have already added > and then configure whatever is using swap to consume less. In your case, > amavisd/clamd have settings which will do so. I would also eliminate any > unnecessary services on the box. Your VPS provider may also be able to > provide you with a separate block device which can be used as dedicated > swap although I would avoid doing that under most circumstances. > >