What are the advantages of using ZFS over sticking with UFS2?

I haven't installed FreeBSD yet, but I plan to as soon as 8.0 stable comes out since my wireless card isn't supported until then. Anyway, I am currently collecting as much information as I can about FreeBSD before I download the .iso and start installing. If I understand correctly UFS2 is the default file system for / (right?). After lurking in these forums for a while, I've seen that ZFS is popular, although experimental (that might change in 8.0 with version 13). ZFS does require tuning, optimization, and still it has problems with crashing, kernel panics, etc. as I have seen on these forums! Why aren't people just sticking with UFS2? Is UFS2 really that bad?

My system is a Sony VAIO VGN-SZ430N with a 64-bit compatible intel core 2 duo at 2.00 gigahertz and 2 gigabytes of DDR2 RAM. I plan to install the amd64 version of FreeBSD. I don't plan to turn this into a server or anything; I just use it for light desktop tasks, such as web browsing with Firefox (including YouTube and flash-intensive sites), typesetting with LaTeX, and perhaps a few other things in the command line (email, editing, &c.) I won't even be using a resource-intensive DE like GNOME. I use XMonad and all the superlight tools that go well with it. Will ZFS work well on my system? Is it even worth using in this environment rather than UFS2 or another file system? I've googled around a lot and searched these forums as well. All I got were some sites that explained how great ZFS was, but not anything about its relationship to UFS2.

Could someone shed some light on this?
 
UFS2 is great, stable and fast filesystem..... I've been using it all the time until I tried ZFS.
UFS very old, about 20-30 years old. Imagine yourself in 20-30 years...


ZFS makes so many things easier.

snapshots and rollback are just a better of seconds...
I make snapshot try to update ports, If I faill (like I did with graphics/jpeg port) I rollback...

with zfs you can turn off your computer by plugging out power plug. Next time you start you won't need to check file system. All data will be OK.

you can create snapshot of base file system, clone it, and use clone as base for jail. You can use unlimited number of clones, and Huge number of jails.. while only spending HDD space for 1 base system, because snapshots/clones only grow in size only when you modify fs, that snapshot was created from, or modify clone

ZFS supports self healing. If you configured your setup right even damaged disk won't be able to damage your data (it all depends on configuration etc)

with zfs you won't ever need to use tools like gpart, gpt, bsdlabel, fdisk.

ZFS is absolutely space efficient.

Also zfs solves many other problems....

With zfs if anything goes wrong, I simply rollback to latest usable snapshot


So far the only disadvantage I see is minor lags on high IO. My system hanging after root rollback (might be because I use geli). And higher cpu load.

But compare this to advantages that zfs gives....


zfs is SUPER
 
There's no doubt that ZFS is great (I just tried it myself recently). There are excellent features such as snapshots, checksums, compression, etc. Allocating space is also much easier than UFS if you have the need for more room.

However, for desktop use, ZFS might be an overkill. It's great for backups and storage, but UFS is much more stable than ZFS right now. Keep in mind that ZFS is still an experimental feature.

The major drawback is that it uses much more memory than UFS, but you should still have more than enough RAM for all the applications you need.
 
Just a question, would it be possible to run ZFS over a bunch of different USB flash-sticks, creating sort of an "immortal" filesystem , able to add new USB-devices and recover when one is lost?
 
MG said:
Just a question, would it be possible to run ZFS over a bunch of different USB flash-sticks, creating sort of an "immortal" filesystem , able to add new USB-devices and recover when one is lost?

madness
 
dennylin93 said:
However, for desktop use, ZFS might be an overkill. It's great for backups and storage, but UFS is much more stable than ZFS right now. Keep in mind that ZFS is still an experimental feature.

The major drawback is that it uses much more memory than UFS, but you should still have more than enough RAM for all the applications you need.

I use it for my Desktop PC.
Now I don't have to mess with half finished updates.... (graphocs/jpeg, for example)

If I fail to update, i rollback, and continue doing other stuff.... ZFS is huge time-saver for me
 
BTW, if there was support for booting from compressed zfs, i could boot my PC from 128M flash and sill have plenty of room. lol (I did experiment, some time ago, Booting from zfs was not supported at time)
 
killasmurf86 said:

Why? It can combine storage devices and recover from data corruption or even losing a whole drive.
But it might require too much disk activity for flash memory to keep up with the system.
Booting from it is never necessary. That be done from a standalone storage device. I just want a backup/archiving solution that fysically never breaks all at once, just a part of it at a time which is immediately recovered.
 
If you use 1 flash, and set copies=2 or copies=3, then, no problem, but If you want to use multiple flash, then I think it's madness...

Are you going to carry 10x flash, everywhere you go?


[That's how I understand this], whine not to use external HDD, then?
 
killasmurf86 said:
I use it for my Desktop PC.
Now I don't have to mess with half finished updates.... (graphocs/jpeg, for example)

If I fail to update, i rollback, and continue doing other stuff.... ZFS is huge time-saver for me

Actually, I love it as well. The snapshots are just excellent. Right now I'm allocating space for an even bigger pool :e.
 
killasmurf86 said:
If you use 1 flash, and set copies=2 or copies=3, then, no problem, but If you want to use multiple flash, then I think it's madness...

Are you going to carry 10x flash, everywhere you go?


[That's how I understand this], whine not to use external HDD, then?


Not for carrying with me, but I considere a usb hub filled with flash sticks /dev/da1 to da10. They al are available throug the umass kernel module.

The chance of an usb hub breaking down is very small. It's a solid state device. Of course a flash stick can break, but that should be taken care of by ZFS. The broken device must be taken out of the pool and another can be added while running.

This way you have a customized storage device with a extreme high reliability and a long life.
 
Wow, ZFS sounds pretty amazing, especially the rollback feature. FreeBSD 8 is supposed to have v13 and be much more stable, and I read that ZFS doesn't even need tuning on amd64 with 2GB of RAM from the Wiki (is that correct?).

I think you guys convinced me. I'm going to read up on ZFS as FBSD 8.0 approaches and try to get that set up. Thanks for all your help!

But wait, is the tuning really that bad or is it just editing a few config files (and it's all spelled out in the Handbook/Wiki), and is the amd64 2GB RAM thing true?
 
MG said:
Not for carrying with me, but I considere a usb hub filled with flash sticks /dev/da1 to da10. They al are available throug the umass kernel module.

The chance of an usb hub breaking down is very small. It's a solid state device. Of course a flash stick can break, but that should be taken care of by ZFS. The broken device must be taken out of the pool and another can be added while running.

This way you have a customized storage device with a extreme high reliability and a long life.

End very slow
 
Allamgir said:
Wow, ZFS sounds pretty amazing, especially the rollback feature. FreeBSD 8 is supposed to have v13 and be much more stable, and I read that ZFS doesn't even need tuning on amd64 with 2GB of RAM from the Wiki (is that correct?).

I think you guys convinced me. I'm going to read up on ZFS as FBSD 8.0 approaches and try to get that set up. Thanks for all your help!

But wait, is the tuning really that bad or is it just editing a few config files (and it's all spelled out in the Handbook/Wiki), and is the amd64 2GB RAM thing true?

On AMD64 there are other problems ;)
Make sure you'll have working video driver (compilable video card)
 
Uh, oh. Could you provide a link that tells what I have to do on AMD64 for teh über ZFS? I'm still deciding whether to go with amd64 or i386 since I only have 2GB of RAM. After reading the other posts about it in this forum, I am leaning towards 64 bit. It works fine on my system with Arch Linux, too.
 
I have two in my computer with a STAMINA/SPEED switch to switch between them. I have:

NVIDIA Geforce Go 7400 with 335 MB of video RAM

integrated Intel GMA950 (I think).
 
Allamgir said:
I have two in my computer with a STAMINA/SPEED switch to switch between them. I have:

NVIDIA Geforce Go 7400 with 335 MB of video RAM

integrated Intel GMA950 (I think).

I'm not sure about Intel, but Nvidia, driver doesn't support 62bit yet. you could use nv driver (but then you can forget about acceleration)

AdamK would know more
 
Yeah, I read all the fuss about NVIDIA's FreeBSD amd64 driver (it is in the works and might come out with 8, though). Currently I'm running Arch Linux and testing all the things I might need to use with FreeBSD. The nv driver works fine for me (and really fast!) because I only use XMonad with no transparency anywhere and no special effects. xf86-video-intel might work on my system assuming it works fine in FreeBSD. I saw it in the ports.

Well this all sounds great. ZFS seems like an awesome file system that should work well on my computer. I'll be sure to use it once I install FreeBSD.

Btw, I would just like to say you guys are FAST! I've never been on forums where I get 10 posts of useful support within the first day, and then some replies after that within minutes! This includes the Arch Forums, Ubuntu Forums, Playstation, etc. I'm already loving this community.

Also, a bit off topic, but I noticed that a lot of the OS X configuration files still have FreeBSD 4.(something) commented at the top of the file! I figured Apple would do all their housekeeping and brand "APPLE COMPUTER" everywhere. I guess not many people look at the config files.
 
MG said:
Just a question, would it be possible to run ZFS over a bunch of different USB flash-sticks, creating sort of an "immortal" filesystem , able to add new USB-devices and recover when one is lost?

In theory, yes. It would be probably be horribly slow, though, due to the nature of USB flash sticks (they tend to be made using MLC flash instead of SLC).

You would definitely want to use glabel(8) to label the individual sticks, in case you have to shuffle them between USB ports, or a stick dies, etc. Otherwise, the sticks could get all renumbered (da12 suddenly becomes da11), and the pool would show as broken. A "zpool export", "zpool import" will generally fix that, but using labels prevents it from happening in the first place.
 
  • Thanks
Reactions: MG
Allamgir said:
But wait, is the tuning really that bad or is it just editing a few config files (and it's all spelled out in the Handbook/Wiki), and is the amd64 2GB RAM thing true?

On 64-bit FreeBSD 7.2 or newer, there's no manual tuning required, it's all done automatically. However, you can limit the size of the ZFS ARC.

My "rule of thumb" so far (for 32-bit FreeBSD 7.2+, and 64-bit FreebSD 7.2 w/less than 4 GB of RAM) is to limit the size of vm.kmem_size_max to 1/2 RAM, and to limit vfs.zfs.zrc_max to 1/2 of kmem. These settings go into /boot/loader.conf. For example:
Code:
# ZFS settings for 2 GB of RAM
vm.kmem_size_max=1024M
vfs.zfs.arc_max=512M
 
Back
Top