# ZFS vs UFS



## Wolfram (Nov 12, 2010)

Hello dear community,

I suppose to install FreeBSD 8.1 (amd64) on a VMware ESXi 4.0/4.1 [vSphere 4.0/4.1] Host; the VM's main specifications are:

- Intel DualCore (E5450 @ 3.00GHz)
- 4GB RAM
- 1 x 80GB HD

Which is in your opinion the best ( = fast / stable / best performance) filesystem for this VM?

I would be really grateful if you could share your experience.

Cheers!


----------



## olav (Nov 12, 2010)

Both can be fast, and both are stable. ZFS's main advantage over UFS is end to end checksumming. But that won't matter on a system without ECC memory? Correct me if I'm wrong.


----------



## Alt (Nov 12, 2010)

Probably you will need scalable fs/raid and/or easy backup/restore, so you should think into future and chose depending on needs


----------



## Wolfram (Nov 12, 2010)

hi olav, thank you for your reply.

well, as I wrote, it's a vm host, so I am not sure if the RAM used has ECC.

the vm is supposed to be used as web- and databaseserver, so our major interests are 1) speed and 2) stability.

certainly zfs has much more features than ufs, but the question is, if it's at least as fast and stable as ufs.


----------



## graudeejs (Nov 12, 2010)

olav said:
			
		

> Both can be fast, and both are stable. ZFS's main advantage over UFS is end to end checksumming. But that won't matter on a system without ECC memory? Correct me if I'm wrong.



ZFS advantages over UFS:
raidz 1 or 2
Unlimited snapshots, clones, filesystems
pool bases storage...
self healing


Did I say snapshots?
Snapshots have saved lot of time for me


----------



## shitson (Nov 14, 2010)

I don't really think it's a case of "vs" i really think each to their own strengths. ZFS will be used for your storage critical data and you will use UFS for your root and primary OS drives. I remembering hearing that UFS is very robust and also that tools for recovery from ZFS are not upto the standards of UFS. If using UFS ensure that your partition our your drive to prevent a partition failure from taking out too much data... I'm sure that someone could shed some more light on this topic.


----------



## oliverh (Nov 14, 2010)

Differences: ZFS is stable, UFS is rock-stable (more than 20 years). ZFS is fast, UFS out of the box is poorly configured in FreeBSD. If you're working constantly with lots of huge data etc. then go with ZFS, but place your operating system on UFS. I do know many server environments, where the advantage of ZFS is small or sometimes even of no use at all. Playing with ZFS on some desktop is nice, but using ZFS - at least in FreeBSD - on a full-blown production server is quiet a different story. There are still theeting troubles in some areas of ZFS especially on its FreeBSD port.


----------



## expl (Nov 14, 2010)

For file servers ZFS is the best solution out there. For anything else I would go with UFS as a lot of services commonly used have their own caching mechanisms and will just create memory overhead over ZFS with no speed performance increase (it will even decrease compared to UFS).


----------



## dennylin93 (Nov 16, 2010)

oliverh said:
			
		

> Differences: ZFS is stable, UFS is rock-stable (more than 20 years). ZFS is fast, UFS out of the box is poorly configured in FreeBSD. If you're working constantly with lots of huge data etc. then go with ZFS, but place your operating system on UFS. I do know many server environments, where the advantage of ZFS is small or sometimes even of no use at all. Playing with ZFS on some desktop is nice, but using ZFS - at least in FreeBSD - on a full-blown production server is quiet a different story. There are still theeting troubles in some areas of ZFS especially on its FreeBSD port.



About the "ZFS is fast" part... ZFS is slower than UFS when writing to disk on all the servers I have access to (using mirror and raidz1), so I only use ZFS for data storage. However, this varies depending on your hardward and setup.

The major benefits of ZFS: snapshots, compression, checksums, and RAID.


----------



## danbi (Nov 18, 2010)

ZFS/UFS is faster is speculative at least, without providing intended usage and layout. For specific tasks either of these is clearly faster. ZFS benefits greatly from caching and re-ordering/grouping of writing operations, prefetch etc. However, to see the benefit you need to have sufficiently large server (as in CPU, RAM and number of disks).

ZFS does things UFS has never done, so the comparison is not really adequate. It's sort of comparing DOS with UFS.


----------



## wonslung (Nov 19, 2010)

dennylin93 said:
			
		

> About the "ZFS is fast" part... ZFS is slower than UFS when writing to disk on all the servers I have access to (using mirror and raidz1), so I only use ZFS for data storage. However, this varies depending on your hardward and setup.
> 
> The major benefits of ZFS: snapshots, compression, checksums, and RAID.



ZFS is really fast with newer hardware.  I've got some zfs systems which read over 600 MB/s

I'd say if you're on less than 4 gb ram OR using a 32 bit cpu, UFS will likely be faster though.


----------



## UNIXgod (Nov 19, 2010)

Has anyone here used _hammer_? curious how that stacks up to zfs?


----------



## Nukama (Nov 19, 2010)

Interaction of Hammer and ZFS.


----------



## rusty (Nov 19, 2010)

Gotta love the compression on them drives.


----------



## oliverh (Nov 19, 2010)

wonslung said:
			
		

> ZFS is really fast with newer hardware.  I've got some zfs systems which read over 600 MB/s
> 
> I'd say if you're on less than 4 gb ram OR using a 32 bit cpu, UFS will likely be faster though.



ZFS can be even a lot slower than UFS in certain areas and it doesn't depend on the hardware. Reads over xxx MB/s are nonsense, such numbers are maybe impressive for some gamers or home users, but without any further meaning for a server. Apart from that, compensating shortcomings of software with hardware is sometimes a sign for bad coding. Don't get me wrong, ZFS is really nice, especially in Solaris, but you know Solaris is also known as "Slowlaris" and ZFS is just a part of it designed for Solaris.


----------



## UNIXgod (Nov 20, 2010)

Nukama said:
			
		

> Interaction of Hammer and ZFS.



lol. I meant this:
http://www.dragonflybsd.org/hammer/


----------



## dennylin93 (Nov 20, 2010)

wonslung said:
			
		

> ZFS is really fast with newer hardware.  I've got some zfs systems which read over 600 MB/s
> 
> I'd say if you're on less than 4 gb ram OR using a 32 bit cpu, UFS will likely be faster though.



On one box here with 3x500 GB SATA drives in raidz1 (with 64-bit Xeon and 4 GB RAM), ZFS has faster reads than UFS, but slower writes.


----------



## wonslung (Nov 20, 2010)

oliverh said:
			
		

> ZFS can be even a lot slower than UFS in certain areas and it doesn't depend on the hardware. Reads over xxx MB/s are nonsense, such numbers are maybe impressive for some gamers or home users, but without any further meaning for a server. Apart from that, compensating shortcomings of software with hardware is sometimes a sign for bad coding. Don't get me wrong, ZFS is really nice, especially in Solaris, but you know Solaris is also known as "Slowlaris" and ZFS is just a part of it designed for Solaris.



I'm sorry but you're wrong on many points here.  ZFS absolutely DOES scale well on new hardware and is QUITE fast.

reads over xxx MB/s isn't nonsense at all, it's very real and very possible.  gigabit links in an aggregation and i have no problem maxing both out over the network.  Anyways, I'm aware zfs can be slower than UFS, and it's typically on older machines without much ram, but on newer hardware, it scales very well and is often faster.


----------



## wonslung (Nov 20, 2010)

dennylin93 said:
			
		

> On one box here with 3x500 GB SATA drives in raidz1 (with 64-bit Xeon and 4 GB RAM), ZFS has faster reads than UFS, but slower writes.




Yes, i believe that.    Scale it up a bit and you'll probably notice faster reads AND writes.  Add a vdev or two and it will make a huge difference.  Also, double the ram and you'll notice a huge performance increase as well.

The more drives and vdevs you give zfs, the higher the potential read/write speed (though it depends on layout) .  ZFS can make intelligent i/o choices that other filesystems don't have the option to make.


----------



## chrcol (Nov 23, 2010)

in my opinion UFS days are numbered.

zfs not only has better features but it is also much faster in response times and cache management, things like mysql are much more responsive as zfs has much better random access and i/o latency.  In addition UFS doesnt improve under NCQ like zfs does, it seems to have some kind of extra bottleneck.

I have sata zfs mirror outperforming scsi raid10 on ufs.


----------



## carlton_draught (Nov 23, 2010)

Wolfram said:
			
		

> - Intel DualCore (E5450 @ 3.00GHz)
> - 4GB RAM
> - 1 x 80GB HD
> 
> ...


I would consider using another HDD in mirror configuration for ZFS. It will double read speed and more importantly, allow self-healing and toleration of 1 head crash. As your setup is now, if one HDD is corrupting data or has a head crash, your system is potentially hosed.

Edit: Oh whoops, it is run in a VM. Nevermind then. You might want to consider using COPIES=2 for self-healing.


----------



## bsd10 (Dec 10, 2010)

olav said:
			
		

> Both can be fast, and both are stable. ZFS's main advantage over UFS is end to end checksumming. But that won't matter on a system without ECC memory? Correct me if I'm wrong.



Why won't it matter on a system without ECC memory?


----------



## kpa (Dec 10, 2010)

One could argue that without ECC memory there is no way to detect corruption that happens when the file contents are in memory (for example a text file loaded into an editor) and the system would happily write back corrupted data to disk and zfs checksum wouldn't help in that case.


----------



## aragon (Dec 10, 2010)

Is a ZFS system without ECC memory at any more risk of data loss than a UFS system of the same?


----------



## carlton_draught (Dec 10, 2010)

aragon said:
			
		

> Is a ZFS system without ECC memory at any more risk of data loss than a UFS system of the same?


I don't believe so.

However, I know that at least for me the hashes are the primary reason I use ZFS over all other file systems. If you have this higher requirement that your data is not being corrupted over time, it is incongruous to run non-ECC RAM, seeing that this opens a much larger window for your programs to write errant data (and the only thing ZFS will do is ensure that the data will remain incorruptibly errant!). Of course, it is possible that those who use ZFS want some other feature that it has over UFS and don't care about data corruption, in which case it will not matter.


----------

