ZFS with only 4GB ram

Status
Not open for further replies.

esamett

Patron
Joined
May 28, 2011
Messages
345
I had home server with 10 x 2 tb drives with 4GB ram limited system. This rig had dual core CPU. Data transfer was pulsatile but so much better than my Promise NAS box. I now have single core cpu system with 8 gb ram which runs faster and smoother. The only time the CPU is working hard is when a scrub is running. If multiple users are accessing the system my video playback is choppy. Otherwise I have no issues.
 

rcrh

Dabbler
Joined
Apr 1, 2012
Messages
15
...If multiple users are accessing the system my video playback is choppy. Otherwise I have no issues.

Choppy playback from a media server seems like a pretty big failure but I guess it depends on how many users = "multiple". Hopefully you could serve up at least two or three streams at once.
 

Cabby

Cadet
Joined
Sep 15, 2013
Messages
9
I was loooking for a new use of a small Intel Atom system with two cores, 4Gb Ram, Gigabit-NIC and a 1TB-Notebook drive, so installed freenas 9.1.1 and created one ZFS volume.

First impression is it runs perfectly fine, without any tuning, transfer rates are around 45Mb/s, probably also limited by the notebook drive.

I have not testet media streaming or having several user trying to access the system, and as far as I understood ZFS, larger drives will probably also affect performance/require additional Ram.

However, the main purpose for this NAS is to store away data backups safely, one user at a time, so the question is, what is the safer option (for the data), switching to UFS and beeing inside the freenas recommendion or to continue to use ZFS, maybe with some tuning.
 

Cabby

Cadet
Joined
Sep 15, 2013
Messages
9
Reading through the ZFS wiki-article, the in-built data integrity only makes sense if you have a second copy of a file in a raid or by making copies of each file on hte same disk, so it seems in my one-small-disk-scenario there maybe is no advantage using ZFS. I will try ufs which should run without problems on a 4Gb system.
 
D

dlavigne

Guest
Which portion of the article gives you that impression? Even on one disk, you still have checksums and scrubs, which deal with data integrity. What is missing will be disk redundancy.
 

Cabby

Cadet
Joined
Sep 15, 2013
Messages
9
From the Wikipedia article on ZFS

ZFS data integrity

For ZFS, data integrity is achieved by using a (Fletcher-based) checksum or a (SHA-256) hash throughout the file system tree.[36] Each block of data is checksummed and the checksum value is then saved in the pointer to that block—rather than at the actual block itself. Next, the block pointer is checksummed, with the value being saved at its pointer. This checksumming continues all the way up the file system's data hierarchy to the root node, which is also checksummed, thus creating a Merkle tree.[36] In-flight data corruption or Phantom reads/writes (the data written/read checksums correctly but is actually wrong) are undetectable by most filesystems as they store the checksum with the data. ZFS stores the checksum of each block in its parent block pointer so the entire pool self-validates (https://blogs.oracle.com/bonwick/entry/zfs_end_to_end_data )
When a block is accessed, regardless of whether it is data or meta-data, its checksum is calculated and compared with the stored checksum value of what it "should" be. If the checksums match, the data are passed up the programming stack to the process that asked for it. If the values do not match, then ZFS can heal the data if the storage pool has redundancy via ZFS mirroring or RAID.[37] If the storage pool consists of a single disk, it is possible to provide such redundancy by specifying "copies=2" (or "copies=3"), which means that data will be stored twice (thrice) on the disk, effectively halving (or, for "copies=3", reducing to one third) the storage capacity of the disk.[38] If redundancy exists, ZFS will fetch a copy of the data (or recreate it via a RAID recovery mechanism), and recalculate the checksum—ideally resulting in the reproduction of the originally expected value. If the data passes this integrity check, the system can then update the faulty copy with known-good data so that redundancy can be restored.

So, if ZFS finds data corruption via checksum, to heal it, it needs another copy of that file, one way or another. At least, thats how I understood it.
 

Cabby

Cadet
Joined
Sep 15, 2013
Messages
9
That's a good point, the earlier you know about errors the better, even if they cannot be corrected automatically.

Comparing UFS to ZFS, on the Intel Atom 525-System with 4Gb Ram, 1TB notebook drive, the values while copying indicated a somewhat slower speed of around 10MB/per sec on large files with ZFS as the file system.

Taken from a larticle about tuning freenas for smaller memory systems, I added the following values to /boot/loader.conf, but they had no visible impact on performance:
vm.kmem_size "2560M", vm.kmem_size_max "2560M", vfs.zfs.arc_min "1536M", vfs.zfs.arc_max "1536M".

I guess using ZFS with its increased data safety is preferable to to using UFS, even if it is a little bit slower. However, I still find this sentence on the official Freenas Hardware Recommendations page somewhat off-putting, as it indicates data is less safe on a smaller memory system with ZFS

"If you don't have at least 8GB of RAM with ZFS or 2GB of RAM with UFS, you should consider getting more powerful hardware before using FreeNAS® to store your data otherwise data loss may result."
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I can explain your concern and the quote. ZFS needs a lot of RAM to function well. Generally speaking it gives itself 7/8th of all system RAM. Naturally you can tweak this, but unless you plan to spend several weeks of intensive googling and book reading you won't have a clue how to effectively tweak your system. I have yet to see anyone post ZFS tweaks that made any kind of logical sense. As a noobie to ZFS you have no chance of getting it right. Anyway, 7/8th of system RAM for everything else non-ZFS is not very much when you have 4GB of RAM(only 512MB for all other system process). Even at 8GB that represents only 1GB. So you start dealing with pressure from the system for more RAM as you go lower and lower.

Anyway, ZFS is a transactional file system. It's supposed to roll back incomplete transactions in the event of a kernel panic, loss of power, or any other situation where a zpool has a transaction in progress but did not finish. This is to prevent corruption and ensure complete consistency with the file system and the data.

When you put both together the system should be able to handle kernel panics due to insufficient RAM. For whatever reason however it doesn't. Something goes wrong and the forum has had MANY people that had less than 8GB suffer a failure of the pool to mount after a kernel panic. Kernel panics can happen with increasing frequency as you go below 8GB. 8GB seems to be the smallest denomination of RAM that don't have kernel panics related to insufficient RAM. If the pool will not mount you can kiss your data goodbye. All if it. Enough users have claimed that a single loss of power without a UPS or a kernel panic cost them their entire pool.

I recently had the chance to work with a popular data recovery expert on the phone(brand will remain nameless to protect the innocent). He assured me that ZFS recovery tools do exist. Quotes for data recovery from him said that it ranged from $3000 to 5 digit figures(and more) depending on the amount of corruption and how much time they have to put into it. Later, he had to email me to admit that his tools do not do ZFS recovery, that he wasn't aware of any that do exist, but that they may look into it in the future. There are no software tools that you can use yourself at home to recover your data.

Everyone wants the same thing with ZFS, right? Protection from corruption(silent or otherwise), good performance, and the expectation that our data will still be there tomorrow when we wake up. If you want all 3 of those, then you should be heeding the comments in the manual regarding hardware requirements. They are written in blood and tears from other people that have learned the lessons the hard way. That means 8GB minimum, ECC-RAM, and hardware that isn't off the shelf trash. The requirements used to be much lower, but have been raised based on user problems from days gone by. If you want to break any one(or more) of those rules, the choice is entirely yours. But if your pool suddenly goes belly up there isn't a person on the planet that will be able to help you. As one of the other mods put it, not using enough RAM, using poor quality components, and using non-ECC RAM is like driving a car without a seatbelt. You can be fine for today, tomorrow, and perhaps for many years. But that one time that you will wish you had that seatbelt will be the day its not there.
 

Cabby

Cadet
Joined
Sep 15, 2013
Messages
9
Thanks for the long reply.

So in short, it is the experience in this forum is that system with ZFS and less than 8Gb tend to fail more often than systems with at least 8Gb memory, therefore the recommendation?!

Fine by me, in that case I will just use UFS, it will be more than good enough for my purposes.
 

Wyquit

Cadet
Joined
Aug 19, 2014
Messages
5
Ok so after dabbling around the Linux home built nas system options I've come to look heavily at freenas

I'm going to be running a
Amd Athlon duel-core 64 2
3 gb 512 mb ram
A 300 gb hdd and a 2 tb HHd

Is this good enough for a personal storage space?
I'm basically going to be using it like Dropbox, no heavy stuff intended (torrenting,streaming etc.)
At most il download maybe 10 files a day to the system I jut basically want a backup for important files as a place to share files between my 3 pcs without running aroun with a USB drive all the time.

-wyquit
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
No. Check out our hardware requirements in our documentation. You need 8GB of RAM minimum for FreeNAS. I'd wager your hardware may not even be compatible with FreeNAS because you are using AMD. :(
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
RAM probably way too low to run ZFS, so you'd have to settle for UFS, which will be no longer supported.
 

Wyquit

Cadet
Joined
Aug 19, 2014
Messages
5
Ok so any recommendations?

I have read the documentation on ram and requriements , and all the information makes sense.
I was just curious as to whether or not I could manage with my "spair parts" system.

Is there any other options I could use?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Tell you the truth, you'd probably be best served with other things. Using ZFS with that low RAM is too risky.
Look into Zentyal (Ubuntu-based) or SME server/ClearOS (CentOS-based) Linux. They're very similar to FreeNAS (web GUI and all), but does not have that stringent RAM requirement.
Seeing that you said you've already dabbled into Linux recently, you're really already on the right track, perhaps you just needed distro suggestions.

Here's a snapshot of Zentyal system requirements profile taken from their wiki page:
En-3.5-images-intro-zentyal-install-tabla-installation-EN.png
 
Last edited:

Wyquit

Cadet
Joined
Aug 19, 2014
Messages
5
Tell you the truth, you'd probably be best served with other things. Using ZFS with that low RAM is too risky.
Look into Zentyal (Ubuntu-based) or SME server/ClearOS (CentOS-based) Linux. They're very similar to FreeNAS (web GUI and all), but does not have that stringent RAM requirement.
Seeing that you said you've already dabbled into Linux recently, you're really already on the right track, perhaps you just needed distro suggestions.
Il look into those

My system (i plan on making a nas) will run debian 7 with the lxde desktop gui. So I know it's low for power and such.

But I really want to reuse old gear without the cost of a awesome system.
(Intel 3.7 ghz proc, 4 4th hdds, hardrive fans etc,)

I have looked Into amahi, and I really like it, but again my pc won't run it.

Thank you very much for your info

-wyquit
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Il look into those

My system (i plan on making a nas) will run debian 7 with the lxde desktop gui. So I know it's low for power and such.

But I really want to reuse old gear without the cost of a awesome system.
(Intel 3.7 ghz proc, 4 4th hdds, hardrive fans etc,)

I have looked Into amahi, and I really like it, but again my pc won't run it.

Thank you very much for your info

-wyquit
Yeah, I would try those distros I listed first. Unlike vanilla Debian, they're designed with server duties in mind.
Many things are either pre-configured or easy to configure and it'll make your life easier, in general.
 
Last edited:

Wyquit

Cadet
Joined
Aug 19, 2014
Messages
5
Yeah, I would try those distros I listed first. Unlike vanilla Debian, they're designed with server duties in mind.
Many things are either pre-configured or easy to configure and it'll make your life easier, in general.
After looking those distros over I'm seriously going to look into clearos
It's system requirements are low enough an I can have a VPN,nas and gateway setup on it.

Simply looks perfect , thanks a ton!
Though I feel like a "traitor" to freenas
 

Knowltey

Patron
Joined
Jul 21, 2013
Messages
430
Ok so after dabbling around the Linux home built nas system options I've come to look heavily at freenas

I'm going to be running a
Amd Athlon duel-core 64 2
3 gb 512 mb ram
A 300 gb hdd and a 2 tb HHd

Is this good enough for a personal storage space?
I'm basically going to be using it like Dropbox, no heavy stuff intended (torrenting,streaming etc.)
At most il download maybe 10 files a day to the system I jut basically want a backup for important files as a place to share files between my 3 pcs without running aroun with a USB drive all the time.

-wyquit

Are you running 3GB of RAM or 512MB of RAM? The first is not even half of the minimum system requirements, the second is shooting yourself in the face.

And people, FreeNAS 7 isn't related to the current FreeNAS. FreeNAS 7 is now known as NAS4Free.
 
Last edited:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
And people, FreeNAS 7 is related to the current FreeNAS. FreeNAS 7 is now known as NAS4Free.

If by "related" you mean "shared a name with" or "is also based on FreeBSD." It isn't related in any meaningful way, being an entirely different codebase and design philosophy.
 
Status
Not open for further replies.
Top