Page 1 of 1

Conflicting recommendations?

Posted: 15 May 2015 04:11
by derailleur
So, I have a "FULL" NAS4Free install, with the system + swap + "data" on a 500 GB drive, and a 2x 3GB ZFS mirror pool for my shared filesystems. The "data" partition is empty because I store everything on the ZFS array. I'd like to change to embedded on a 4GB CF card and do away with the heat and power draw of the 500GB drive (and maybe use the 500 gb drive elsewhere).

So I went to install NAS4Free on the CF card. The installer says embedded without swap is for "experts" and I have seen the links here as to why one does in fact want swap. But at the same time the installation notes state that "File based swap and ZFS volume swap is not recommended." There is enough room to put ~1GB swap on the CF, but I also know that's a good way to wear out the CF card.

So am I better off with no swap or setting up swap on the ZFS pool? FWIW, I was going to set it up with no swap originally since the older documentation I've seen online appears to recommend that for the embedded install. I've never seen NAS4Free use even 2GB of the 4GB memory in my NAS box, and I don't use dedup or raidZ, so it's tempting to try it without swap. I already installed the embedded to the CF without swap since I installed it using a different computer.

Or should I just throw up my hands and keep using the "FULL" install on the spinning disk? ;-)

Thanks.

Re: Conflicting recommendations?

Posted: 15 May 2015 07:31
by raulfg3
Do not use Swap on embeded if you have enought RAM

Re: Conflicting recommendations?

Posted: 15 May 2015 13:59
by armandh
+1

the RAM/CPU buss is as fast as it gets outside the CPU.
swap will be slower when used
with enough RAM it wont be used.
I have run embedded N4F [UFS mirror] on 386 Mb of PC-100
about 160 Mb of usable RAM.
it was 100% stable but
file transfer speed was like recycling via plate tectonics [4 Mbps]

N4F is extremely stable on good hardware
a huge lot of RAM or swap is not needed
of course it depends on the usage [YMMV]
if the RAM usage indicator is mostly under half you likely have enough

Re: Conflicting recommendations?

Posted: 16 May 2015 22:09
by derailleur
Thanks for the help! I ended up running without swap, and the embedded is barely using anymore ram than the Full did. Ram usage runs about 4% when I check it, but I've never really looked at it under load. The system is a 3 Ghz Core 2 Duo on an Asus P5GC-MX/1333 with 4 Gb memory. Also obviously the ZFS array is 2x3Tb, not 2x3Gb.

I have to wonder though why NAS4Free lists embedded + swap as "recommended"?

Re: Conflicting recommendations?

Posted: 17 May 2015 03:41
by daoyama
derailleur wrote:Thanks for the help! I ended up running without swap, and the embedded is barely using anymore ram than the Full did. Ram usage runs about 4% when I check it, but I've never really looked at it under load. The system is a 3 Ghz Core 2 Duo on an Asus P5GC-MX/1333 with 4 Gb memory. Also obviously the ZFS array is 2x3Tb, not 2x3Gb.

I have to wonder though why NAS4Free lists embedded + swap as "recommended"?
Swap is guarantee to work using a lot of memory. e.g. firmware upgrading.
Also swap is used for memory disk(recently xmd) reservation.
Without swap, you may need reboot to clean up buffer cached memory before special work.

If your swap is always used over 25%, you need more memory for your work load.
somtime ZFS require work memory but swap on ZFS is no sense. You can not get memory forever on some condition.
You must allocate swap out side of ZFS, so initial swap on USB is reasonable.
Of course, if you use UFS only, you may not need swap on USB.

Re: Conflicting recommendations?

Posted: 17 May 2015 03:49
by derailleur
Thanks ... how much memory does firmware upgrading take? As far as I know, my system when it was a 'full' system never used the swap. I do use ZFS only but not raidz or dedupe or anything fancy, just a mirror of two drives.

Re: Conflicting recommendations?

Posted: 18 May 2015 03:02
by armandh
never had a bit of trouble with ZFS mirror and under 2 Gb of RAM see the last 2 below
then again it is not upgraded
I think the atom/ion box has shared video use of RAM