Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Aug 2015 17:32:39 +0200
From:      "Ronald Klop" <ronald-lists@klop.ws>
To:        freebsd-stable@freebsd.org
Subject:   Re: Swap Questions
Message-ID:  <op.x3c6spl3kndu52@53555a16.cm-6-6b.dynamic.ziggo.nl>
In-Reply-To: <55CDFECF.5090504@tundraware.com>
References:  <55CDE9EE.5090603@tundraware.com> <op.x3c1cvetkndu52@53555a16.cm-6-6b.dynamic.ziggo.nl> <55CDFECF.5090504@tundraware.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 14 Aug 2015 16:44:31 +0200, Tim Daneliuk <tundra@tundraware.com>
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.



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