Installing Swap on SSD

Status
Not open for further replies.

Dros

Cadet
Joined
May 28, 2013
Messages
3
Hi,

I'am quite new to FreeNAS and installed the 8.3 64 Bit on my old Server with 2x XEON 2.8 and 8 GB RAM running 4x2 TB Disks (extending to 8x2 TB in the future) on Sata with ZFS and sharing via iSCSI (to VMware), plus an internal 80 GB SSD for the FreeNAS system. This runs good for testing. I'am familar to Linux and Solaris, but FreeBSD is new to me.

But I don't understand, why I need to reserve Swapspace from every disk? Why can't I make a big swap-partition on the SSD which has enough space (because FreeNAS is on 2 GB) and much faster than the harddrives. I found a lot of similar questions, but no real answers or howtos.

I understood, that FreeNAS needs more partitions for upgrades, so that a user can easily rollback if somethings goes wrong. So Swap-space on the same device could kill the upgrade process or get deleted. But I can also install FreeNAS on a USB-Stick and use the SSD completley as swap-space. Is that possible?

Using ZFS and Dedup eats a lot of RAM, and if the system wants to swap, an internal SSD is better than anything on slower spinning datadisk. Am I right? And if so, how can I do that?

TIA
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
It might be possible to manually add swap space by creating a swap partition and using the swapon command, I just don't know if that persists across reboots.
Also one of my HDDs does not have a swap partition on it, because I was manually replacing it when the old one failed - no problems with that configuration so far.

Just a small heads-up regarding deduplication: http://forums.freenas.org/showthread.php?10995-ZFS-import-runs-out-of-swap-amp-hangs-OS
If you ever run out of RAM, you are basically screwed and need to upgrade RAM before the system is able to boot again.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
But I don't understand, why I need to reserve Swapspace from every disk? Why can't I make a big swap-partition on the SSD which has enough space (because FreeNAS is on 2 GB) and much faster than the harddrives. I found a lot of similar questions, but no real answers or howtos.

Because the first thing every beginner thinks of is "why do I need swap". And the real answer is "because it's a b!+&# to add later if you discover you need it." FreeNAS is large and assumes large resources. It was written assuming it had several gig of memory to play with, which fundamentally alters how you approach software development. But ZFS also loves memory. So the simple thing to do is to provide swap, used rarely, but really a very small tax on your spinny rust and there if needed.

I understood, that FreeNAS needs more partitions for upgrades, so that a user can easily rollback if somethings goes wrong. So Swap-space on the same device could kill the upgrade process or get deleted. But I can also install FreeNAS on a USB-Stick and use the SSD completley as swap-space. Is that possible?

Sure, but why waste an SSD on that? Let it swap to slow disk. The whole point of swapping is stuff that the system isn't currently using but needs to retain for "later".

Using ZFS and Dedup eats a lot of RAM, and if the system wants to swap, an internal SSD is better than anything on slower spinning datadisk. Am I right? And if so, how can I do that?

TIA

You don't want to try dedupe on such a small platform. For 8TB of storage, the recommendation is ~48GB of RAM (8GB base plus 5GB * the number of TB of storage). If you go up to 64GB, then what you do is you take that SSD and make it L2ARC, and you would wind up with a system with lots of I/O capacity plus a stable platform for dedupe.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Sure, but why waste an SSD on that? Let it swap to slow disk. The whole point of swapping is stuff that the system isn't currently using but needs to retain for "later"..

Because when that HD fails (as they do), then the system will crash.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Because when that HD fails (as they do), then the system will crash.
You needed to necro a four-year-old thread to point this out? Because, of course, SSDs fail too.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
You needed to necro a four-year-old thread to point this out? Because, of course, SSDs fail too.


Thought I was replying to a continuation on a different thread... #23
 
Status
Not open for further replies.
Top