I setup this HDD with zfs but no swap, now even with 32GB of ram I am running into issues related to swap.
I created a swap file but I've been told that's a bad idea and can lead to deadlocks. My goal is to eventually debug the programs that I am using to see how to lower their memory usage but for now I just want to add a swap partition.
My hdd layout looks like this:
I tried reading this but I do not want to add a disk: https://www.freebsd.org/doc/handbook/disks-adding.html
This guide describes doing the partitioning on FreeBSD install, I don't want to reinstall my OS: https://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html#configtuning-initial
This document leads to the previous two I listed above: https://www.freebsd.org/doc/handbook/adding-swap-space.html
So how can I actually repartition my hdd to get 4 or 8GB of additional swap space.
My hdd currently has 160GB free and that's nvd0p4 from the gpart show.
How can I shrink that space by 4-8GB and create a swap parition there w/o destroying my setup?
I created a swap file but I've been told that's a bad idea and can lead to deadlocks. My goal is to eventually debug the programs that I am using to see how to lower their memory usage but for now I just want to add a swap partition.
My hdd layout looks like this:
Code:
gpart show
=> 40 500118112 nvd0 GPT (238G)
40 409600 1 efi (200M)
409640 1024 2 freebsd-boot (512K)
410664 984 - free - (492K)
411648 4194304 3 freebsd-swap (2.0G)
4605952 495511552 4 freebsd-zfs (236G)
500117504 648 - free - (324K)
This guide describes doing the partitioning on FreeBSD install, I don't want to reinstall my OS: https://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html#configtuning-initial
This document leads to the previous two I listed above: https://www.freebsd.org/doc/handbook/adding-swap-space.html
So how can I actually repartition my hdd to get 4 or 8GB of additional swap space.
My hdd currently has 160GB free and that's nvd0p4 from the gpart show.
How can I shrink that space by 4-8GB and create a swap parition there w/o destroying my setup?