LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   zfs vs ext4? (https://www.linuxquestions.org/questions/linux-newbie-8/zfs-vs-ext4-4175736086/)

MadeInGermany 04-19-2024 11:00 AM

zfs (like btrfs) is for the big enterprise.
It has the flexibility to quickly grow the file systems by adding more disks. Also moving space between file systems is quick. It has great data recovery possibility if disks break. It has builtin features like data deduplication and encryption. zfs needs some extra GB of RAM.

ext4 is for the home user or small business. Small, fast, safe.
In connection with the (also small) LVM, one can grow filesystems by another disk, or allocate free space to a certain filesystem. With some more steps one can even shrink a certain filesystem to gain some free space, in order to grow another filesystem. Further optional packages are available, for example letsencrypt to encrypt certain folders.

Even in big business often ext4 is used to hold the operating system and applications, and zfs is used to hold petabytes of data for a database or shared filesystems (for example NFS and/or SMB).

replica9000 04-19-2024 11:37 AM

Quote:

Originally Posted by How_To_Linux (Post 6497126)
i have no idea what you mean by "what you want out of a file system"

doesn't literally everyone want the exact same thing? to be able to see my data? copy and paste my data? perform basic manipulations of my data?

this whole "what do i want" thing doesn't make sense, i want what everyone else wants.

Ask yourself: What do I want ZFS to do for me that EXT4 doesn't currently do for my needs?

What specific feature(s) of ZFS caught your attention that you think makes it "better"? While for some people there might be advantages to use it on a single disk, it's really meant for systems where ZFS is working with multiple disks (Similar to RAID). Some of the common selling points mean nothing when used with a single disk.

Also, ZFS isn't a native filesystem for Linux. It's a DKMS module for most Linux distributions, and a potential point of failure if an update goes wrong.

wpeckham 04-19-2024 11:55 AM

Quote:

Originally Posted by How_To_Linux (Post 6497126)
i have no idea what you mean by "what you want out of a file system"

doesn't literally everyone want the exact same thing? to be able to see my data? copy and paste my data? perform basic manipulations of my data?

this whole "what do i want" thing doesn't make sense, i want what everyone else wants.

No, actually. While ZFS will work for that it is less than optimal. IT is optimal for storage solutions that require flexible and redundant (fault tolerant) storage and recovery of large files and large volumes of small files efficiently. It does not use storage as efficiently as some others, bur write and read times are normally excellent and adding and removing storage from the collection is NICE. Storage nerds love it ;-) ZFS is heavier in memory than other solutions, requires different management and administration which means a learning curve, is not integrated into the kernel so adds some vulnerability and potential performance hit (although we have mitigated that issue for most situations). The limit and capacity numbers are very good

I really like ZFS. But I do not use it on my current systems. IF I set up a SAN or NAS server then it will absolutely be in consideration.

EXT4 has the longest stable history, has excellent I/O performance (Better than ZFS for many scenarios), and management is mostly transparent (baked into the kernel and drivers so the user does not need to know). It lacks some of the features, but is simple and dependable and less heavy on the system, and more suitable where those special ZFS features are not needed.

BTRFS Is a good attempt to replace both with something that is between. IT has kernel support like EXT4 with RAID features and COW which EXT4 lacks. IT has snapshots, subvolumes, and flexible device management features more like ZFS. IT has performance that is sometimes better, sometimes worse, but averages on-par with the other two, IT is a very solid option these days.

I have tested and played with others, and I have this advice for the OP.
IGNORE ALL THIS, USE WHAT YOUR DISTRIBUTION MANAGER SETS AS DEFAULT!

Every file system has use cases for which they are optimal, that is why they exist. IF your use is TYPICAL, then the most typical and general solution is your optimal. Changing it will not make your life better. In the best case you will not notice any advantage. If the worst case you system will go to h3ll and you will find yourself reinstalling and back with the default anyway.

IF you ever want to set up a heavy database server, a media server, or a storage server for your home network the other solutions will be waiting in the wings. Until then just leave it alone. You will be happier in the long run.

wpeckham 04-19-2024 12:01 PM

Quote:

Originally Posted by MadeInGermany (Post 6497129)
zfs (like btrfs) is for the big enterprise.

Actually BTRFS is about optimal for the small desktop or laptop. Partitioning is almost meaningless, so you need never worry about it. You almost cannot run out of disk space until you cap the entire disk, and at that point most users cannot get out of trouble on their own anyway. (PLEASE, no matter WHAT file system you use, DO NOT fill up your entire disk!)
I am using BTRFS now for two different laptops, and it is fine. I would not use BTRFS for server storage in the enterprise. Yet. There are better solutions for that.

ZFS is fine for enterprise storage, but also for some kinds of other server operations. It might be a good option for a home server or small business machine. There is nothing about it that makes it only for big enterprise.

I think we agree perfectly that ZFS would not be an optimal or wise solution for the OP.

rkelsen 04-19-2024 04:17 PM

Quote:

Originally Posted by How_To_Linux (Post 6497126)
doesn't literally everyone want the exact same thing?

No.

The first thing you need to understand is that the home user doesn't want the same things as a server administrator, particularly if the servers are hosting large fileshares containing petabytes of mission-critical data.

You can use ZFS at home. There is nothing stopping you. But every single time you run a kernel update there are extra steps you must take or your system will not boot.

computersavvy 04-19-2024 09:08 PM

Quote:

Originally Posted by How_To_Linux (Post 6497095)
i'm here, and i appreciate all the replies i have gotten,
if it's not as good as people have told me

That comment says it all.
Opinions are spouted all day and most of them stink.

The main file system on your machine will hands down beat anything you might dive into by trying to switch to zfs. Admin and maintenance of zfs would far override the zero problems with ext4 I have experienced. Years of experience with ext4 have kept me from switching to anything that may be claimed to be the 'latest and greatest'. It works well, is reliable and trouble free so I choose to not dive into something new with a much shorter track record.

I have tested both zfs and btrfs on a VM and strongly disliked the results. Not for me.

Note that unless you have an enormous system of drives with millions of read/write operations a minute the miniscule differences that might be seem with a different file system would be undetectable. In large volumes of file transactions the difference might be detectable, but with home use you would not experience any benefit. After all, the device itself is usually the bottleneck for IO. The file system in use has negligible affect.

pan64 04-20-2024 05:02 AM

Quote:

Originally Posted by How_To_Linux (Post 6497127)
> but you are ALSO ignoring what you're told. You were told, point blank, that YouTube *IS NOT* a good source of information, and neither is Reddit. You were told what ZFS is and what situations it applies to, and you were told point-blank that for a single-user system (laptop) with external drives, it *MAKES NO SENSE*.

i was also told (on youtube and reddit) that zfs is the greatest thing that has ever happened in file systems and i need to move over to it right now,

question for you, do i have your permission to compare and contrast the things i have been told and to come to my own conclusions?

You speak about unknown sources, unknown information again. There is no youtube and reddit, but links to [be able to] check the reliability of those statements. Without that it is still just crap.
But anyway, if you believe them, follow them, just do not ask LQ about that. And do not ask this way, without sharing any real information.

You have permission obviously to test it, and also it is suggested (to test and learn what you want to use), but as it was already explained you won't be able to detect any [meaningful] differences. If you have no problem don't fix it.
By the way, I don't think you can really create and publish a useful and extensive (comprehensive) comparison on different filesytems. I cannot do that too.

How_To_Linux 04-20-2024 09:52 AM

Quote:

Originally Posted by MadeInGermany (Post 6497129)
zfs (like btrfs) is for the big enterprise.
It has the flexibility to quickly grow the file systems by adding more disks. Also moving space between file systems is quick. It has great data recovery possibility if disks break. It has builtin features like data deduplication and encryption. zfs needs some extra GB of RAM.

ext4 is for the home user or small business. Small, fast, safe.
In connection with the (also small) LVM, one can grow filesystems by another disk, or allocate free space to a certain filesystem. With some more steps one can even shrink a certain filesystem to gain some free space, in order to grow another filesystem. Further optional packages are available, for example letsencrypt to encrypt certain folders.

Even in big business often ext4 is used to hold the operating system and applications, and zfs is used to hold petabytes of data for a database or shared filesystems (for example NFS and/or SMB).

this is a very good answer, thank you, it really puts things into perspective.

Turbocapitalist 04-20-2024 10:10 AM

Quote:

Originally Posted by How_To_Linux (Post 6497319)
this is a very good answer, thank you, it really puts things into perspective.

However even big enterprise will use EXT4 or similar when it is the right tool for the job. Netflix, for example, has very large NAS boxes at key junctions on the Internet backbone in the US to cache movies. They use FreeBSD for that instead of GNU/Linux but, last I heard, they use UFS (the FreeBSD equivalent of EXT4) for that and not OpenZFS. In that particular use-case, speed is the priority and not redundancy. Again, it is all about what you want to use the file system for. Furthermore, if you have multiple partitions you can have multiple file systems. And even if you have the same file system across the board, you can tune it for different environments, e.g. huge numbers of very small files etc.


All times are GMT -5. The time now is 12:53 AM.