ZFS or UFS ?

Questions about the installation of FreeBSD
Post Reply
Grenouille
Posts: 11
Joined: Fri Nov 13, 2015 6:44 am
Location: Europe

ZFS or UFS ?

Post by Grenouille »

Hello,

I am going to install GhostBSD on a laptop, which has 4GB RAM and a Core2 Duo CPU.
Should I use ZFS or UFS ?
What are the pros and cons of both ?
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: ZFS or UFS ?

Post by ASX »

Generally speaking I would not advise a ZFS install on a single disk system, because ZFS is more safe than other filesystems provided that there exists some data redundancy (mirrot, raid z, ...), and for performance reasons that imply a minimum of two disks.

That said, as long as you are ready to do proper backup, you can use ZFS, your HW is fine, (except may be for "deduplication" feature).

The current GhostBSD installer has just introduced ZFS, and is very far from offering an optimal setup, it was added mainly to allow testing.
tankist02
Posts: 15
Joined: Wed Sep 04, 2013 5:46 pm

Re: ZFS or UFS ?

Post by tankist02 »

ZFS is powerful, but takes more resources, it is more suitable for larger servers. UFS is small and fast, excellent for desktops.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: ZFS or UFS ?

Post by ASX »

tankist02 wrote:ZFS is powerful, but takes more resources, it is more suitable for larger servers. UFS is small and fast, excellent for desktops.
Do not take this as an example, but ... just for fun ... I have installed FreeBSD-11 on ZFS on a very old notebook, with Transmeta Crusoe CPU and 480 MB Ram, running X and jwm ... there were 300 MB Ram free ... and it is running quite nicely. :D

Just to say that it doesn't run worse than when using UFS, instead it seems to me is faster and more responsive. Again all that is just for fun, don't take it very seriously. ;)
tankist02
Posts: 15
Joined: Wed Sep 04, 2013 5:46 pm

Re: ZFS or UFS ?

Post by tankist02 »

In my experience ZFS is fast right after reboot. But then the longer I work in the system the slower it gets. I suspect ZFS slows down when internal caches are filled up. I don't see this effect with UFS.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: ZFS or UFS ?

Post by ASX »

tankist02 wrote:In my experience ZFS is fast right after reboot. But then the longer I work in the system the slower it gets. I suspect ZFS slows down when internal caches are filled up. I don't see this effect with UFS.
That's a rather strange behavior, a filled cache should improve performance, that is what cache is for. However ZFS is a complex subsystem and there could be something else going on.

I have also some suspect about some "memory management", because I had experienced myself bad performance in some cases; specifically I had bad performance while using 512byte blocks (both UFS and ZFS), and good performance when using 4K alignment and block size (again both UFS and ZFS). The strange thing in my case is that the disk was really a 512 byte sector (Hitachi 500 GB).

Unfortunately there are too many variables into the game and I was not able to track down exactly what is causing this performance difference, but I know it was real.
tankist02
Posts: 15
Joined: Wed Sep 04, 2013 5:46 pm

Re: ZFS or UFS ?

Post by tankist02 »

I didn't run any scientific performance tests on ZFS, just my casual observations from running FreeBSD 10.x as a workstation. If I do some intensive tasks like processing video or raw photos, copying large sets of files around, etc - ZFS slows down with time.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: ZFS or UFS ?

Post by ASX »

I don't know if you still have a ZFS pool around, but in case would you check about block size ?

Code: Select all

zdb <poolname> | grep ashift
thanks!
Post Reply