This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

SWAP size

New installs of XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
foxdoismil
Starter
Starter
Posts: 38
Joined: 21 Dec 2012 19:46
Status: Offline

SWAP size

Post by foxdoismil »

I am going to install 10.3.0.3 on an crucial SSD 120G. The server has 16G non-ecc RAM. Disks are on a ZFS array.
Should I create a swap partition? What size?
Should I reserve all the SSD for the nas4free install or reserve some are as DATA?
Should I use it as cache for ZFS?
  • M/B : Gigabyte Z87X-UDH3 / CPU : Intel i7 3400 MHz / RAM : 16GB DDR3 1600 / Storage: 8x4TB Seagate NAS HDDs in RaidZ3 ~ 20TB usable disk space / O/S : xigmaNAS 11.2.0 full / SAS/SATA Controller : LSI SAS 9211-8i / Case : NZXT Model H2 - Classic Silent Middle Tower Chassis

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: SWAP size

Post by raulfg3 »

foxdoismil wrote:Should I create a swap partition? What size?
is possible, but for your actual RAM , I do not recommended ( you did not use it).
foxdoismil wrote:Should I reserve all the SSD for the nas4free install or reserve some are as DATA?
If you do a embeded install, only 4GB are used to boot N4f, all the space (120-4) can be used as data disk ( you need to mount it prior to use, ( I use it to store temp data like DDBB of minidlna, and temp files from transmission and mlnet).
foxdoismil wrote:Should I use it as cache for ZFS?
NO, if you really need a cache, better use a dedicated HD, not a partitioned disk.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

foxdoismil
Starter
Starter
Posts: 38
Joined: 21 Dec 2012 19:46
Status: Offline

Re: SWAP size

Post by foxdoismil »

If I install full and make a DATA partition and later I notice that I need the swap, would it be possible to define a swap file on the DATA partition? Tks for the help.
  • M/B : Gigabyte Z87X-UDH3 / CPU : Intel i7 3400 MHz / RAM : 16GB DDR3 1600 / Storage: 8x4TB Seagate NAS HDDs in RaidZ3 ~ 20TB usable disk space / O/S : xigmaNAS 11.2.0 full / SAS/SATA Controller : LSI SAS 9211-8i / Case : NZXT Model H2 - Classic Silent Middle Tower Chassis

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1058
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: SWAP size

Post by JoseMR »

foxdoismil wrote:If I install full and make a DATA partition and later I notice that I need the swap, would it be possible to define a swap file on the DATA partition? Tks for the help.
Hello, you should use at least 2GB(what I personally use) of Swap space regardless of the amount of RAM you already have, this will make you peace of mind also, running out of Swap will cause the OOM(out of memory) killer to terminate some process on the system to release RAM, leading to a unresponsive/unreachable system, or even worst a crash/panic.

Having a small native Swap space on disk is a rule of thumb on production environments, again regardless of the amount of RAM the system have, just leave a small swap on the system disk just in case, as space is extremely cheap nowadays.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

foxdoismil
Starter
Starter
Posts: 38
Joined: 21 Dec 2012 19:46
Status: Offline

Re: SWAP size

Post by foxdoismil »

Thanks for the help
  • M/B : Gigabyte Z87X-UDH3 / CPU : Intel i7 3400 MHz / RAM : 16GB DDR3 1600 / Storage: 8x4TB Seagate NAS HDDs in RaidZ3 ~ 20TB usable disk space / O/S : xigmaNAS 11.2.0 full / SAS/SATA Controller : LSI SAS 9211-8i / Case : NZXT Model H2 - Classic Silent Middle Tower Chassis

bocman
Starter
Starter
Posts: 21
Joined: 01 Apr 2013 11:46
Status: Offline

Re: SWAP size

Post by bocman »

Hello!
I have 8GB RAM, I'm using zfs (10TB), virtualbox with several VMs, Transmission, SMB, FTP, jail (apache, MySQL).
What size of SWAP should I use?

Thax

Lord Crc
Starter
Starter
Posts: 51
Joined: 17 Jun 2013 12:29
Status: Offline

Re: SWAP size

Post by Lord Crc »

I would most definitely create swap, for the simple reason that my server had 16GB RAM, and did not have swap, and crashed hard when it ran out because Transmission suddenly ate up 2GB.

edit: I should stress that my zfs pool was fine, but the server was completely unresponsive and I had to do a hard reset.
Last edited by Lord Crc on 05 Aug 2016 11:33, edited 2 times in total.

User avatar
ernie
Forum Moderator
Forum Moderator
Posts: 1458
Joined: 26 Aug 2012 19:09
Location: France - Val d'Oise
Status: Offline

Re: SWAP size

Post by ernie »

I am going to propose you to use the recommended default value that nas4free suggests during installation : the same amount than your ram value, so 8 GB for the swap.
NAS 1&2:
System: GA-6LXGH(BIOS: R01 04/30/2014) / 16 Go ECC
XigmaNAS 12.1.0.4 - Ingva (revision 7743) embedded
NAS1: Xeon E3 1241@3.5GHz, 2HDD@8To/mirror, 1SSD cache, Zlog on mirror, 1 UFS 300 Go
NAS2: G3220@3GHz, 2x3HDD@2To/strip+raidz1, 1SSD cache, Zlog on mirror
UPS: APC Back-UPS RS 900G
Case : Fractal Design XL R2

Extensions & services:
NAS1: OBI (Plex, BTSync, zrep, rclone, themes), nfs, smb, UPS,
NAS2: OBI (zrep (backup mode), themes)

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: SWAP size

Post by alexey123 »

Swap size can be calculated as:
If server have less 4 G RAM => swap size = 2* RAM SIZE
If server have more then 4G Ram => swap size = RAM SIZE + 2G
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Post Reply

Return to “Install XigmaNAS”