Eventually I used a swap-file, created on the fly and removed once finished the task
Hi guys,
I have a small utilities that is literally sucking all my memories, I'd like to add more swap to see if it is able to finish its task.
I read that using a swap file with ZFS is not a good idea even though is quite easy to create (Handbook 12.12), however I have already a physical swap and perhaps it would not constitute an a threat for the system:
Code:
swapinfo 23:59
Device 1K-blocks Used Avail Capacity
/dev/ada0p5 6292644 0 6292644 0%
Anyway I found this documentation about Solaris:
Adding or Changing Swap Space in an Oracle Solaris ZFS Root Environment - Oracle Solaris 11.1 Administration: Devices and File Systems
This book is for anyone responsible for administering one or more systems that run the Oracle Solaris release. The book covers a range of Oracle Solaris system administration topics related to managing removable media, disks and devices and file systems.Topics are described for both SPARC and...
docs.oracle.com
Where are given the following instructions to add more swap and I wonder if can follow the same procedure with
FreeBSD 13.0
:If the system cannot be rebooted, add another swap volume to increase your total swap space.
For example:
Code:# zfs create -V 2G rpool/swap2
Then, activate the second swap volume.
Code:# swap -a /dev/zvol/dsk/rpool/swap2 # swap -l swapfile dev swaplo blocks free /dev/zvol/dsk/rpool/swap 256,1 16 1058800 1058800 /dev/zvol/dsk/rpool/swap2 256,3 16 4194288 4194288
If necessary, add an entry for the second swap volume in the /etc/vfstab file.
For example:
Code:/dev/zvol/dsk/rpool/swap2 - - swap - no -
What would be the better way to add the swap? With a swap file or with zfs?
Thanks,
freezr
#swap #zfs