From owner-freebsd-stable@freebsd.org Fri Aug 14 15:32:49 2015 Return-Path: Delivered-To: freebsd-stable@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 32CB09B9C3A for ; Fri, 14 Aug 2015 15:32:49 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED043186F for ; Fri, 14 Aug 2015 15:32:48 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1ZQGyG-0001fz-3a for freebsd-stable@freebsd.org; Fri, 14 Aug 2015 17:32:45 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes References: <55CDE9EE.5090603@tundraware.com> <55CDFECF.5090504@tundraware.com> Subject: Re: Swap Questions To: freebsd-stable@freebsd.org Date: Fri, 14 Aug 2015 17:32:39 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <55CDFECF.5090504@tundraware.com> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: - X-Spam-Score: -1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, BAYES_40, URIBL_BLOCKED autolearn=disabled version=3.3.1 X-Scan-Signature: 4c3c8b3d32e7d0cfaf2d58264fc1daa3 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 15:32:49 -0000 On Fri, 14 Aug 2015 16:44:31 +0200, Tim Daneliuk wrote: > On 08/14/2015 08:35 AM, Ronald Klop wrote: >> Does the /dev/md99 device exist now? Otherwise something went wrong >> when you tried adding swap. Try swapon -a without the -q. > > Yes, the device exists and yes, swapon claims is is in use: > > swapon -a > swapon: md99 on /usr/swap0: Device already in use > > But swapinfo doesn't know about it, if it is: > > swapinfo > Device 1K-blocks Used Avail Capacity > /dev/gpt/swapfs 1048576 500300 548276 48% > > > I don't know whether this is just an artifact of how swapinfo reports > things, > but the system acts like it's not seeing the additional swap when it is > under > heavy load. > > The main culprit here, BTW, is clamav which chews through memory like > crazy > as best as I can determine, and this is a VM with only 512M of memory, > hence > the desire to increase swap space. > I tested this on my 11-CURRENT/amd64 laptop and I get this: # grep swap /etc/fstab /dev/gpt/swap0 none swap sw 0 0 md99 none swap sw,file=/tmp/test 0 0 # dd if=/dev/zero of=/tmp/test bs=1M count=10 # swapon -a swapon: adding /dev/md99 as swap device [root@sjakie /tmp]# swapinfo Device 1K-blocks Used Avail Capacity /dev/gpt/swap0 4193280 276744 3916536 7% /dev/md99 10240 0 10240 0% Total 4203520 276744 3926776 7% Works ok for me. Regards, Ronald.