On Fri, 14 Aug 2015 16:44:31 +0200, Tim Daneliuk <tun...@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.
_______________________________________________
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to