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/)

How_To_Linux 04-16-2024 08:30 AM

zfs vs ext4?
 
hello, question, i have heard that zfs is better then ext4 and that i should switch over to it, my question is

why?

why and how is zfs better then ext4?

thank you

boughtonp 04-16-2024 08:59 AM


 
It's not better (or worse), it's different.

Generally, X is never better than Y unless one first defines what "better" means, and - unless that definition matches your own needs - what is better for someone else may or not be the same for you.

ZFS is more akin to Btrfs (B-tree file system) - if you have a reason to switch you should be evaluating both of them - but sometimes people tell others to use the same thing as them, without considering the needs of others.

//en.wikipedia.org/wiki/Comparison_of_file_systems


TB0ne 04-16-2024 09:00 AM

Quote:

Originally Posted by How_To_Linux (Post 6496305)
hello, question, i have heard that zfs is better then ext4 and that i should switch over to it, my question is why? why and how is zfs better then ext4?

Where did you hear this, and who told you that you should 'switch over to it'??? Your first question should also be "Why?"...are you actually having problems with your system?? Disk/filesystem issues?? What are you trying to solve by doing this??

There are lots of things you can find by putting your exact question into a search engine:
https://storage.qsan.com/blog/zfs-vs...torage%20space.

How_To_Linux 04-16-2024 10:56 AM

Quote:

Originally Posted by boughtonp (Post 6496310)
It's not better (or worse), it's different.

Generally, X is never better than Y unless one first defines what "better" means, and - unless that definition matches your own needs - what is better for someone else may or not be the same for you.

ZFS is more akin to Btrfs (B-tree file system) - if you have a reason to switch you should be evaluating both of them - but sometimes people tell others to use the same thing as them, without considering the needs of others.

//en.wikipedia.org/wiki/Comparison_of_file_systems


normally i would agree with you, but i keep hearing that in "every conceivable way that ext4 is, zfs is better" so i wanted to ask you guys what you think

How_To_Linux 04-16-2024 10:56 AM

Quote:

Originally Posted by TB0ne (Post 6496311)
Where did you hear this, and who told you that you should 'switch over to it'??? Your first question should also be "Why?"...are you actually having problems with your system?? Disk/filesystem issues?? What are you trying to solve by doing this??

There are lots of things you can find by putting your exact question into a search engine:
https://storage.qsan.com/blog/zfs-vs...torage%20space.


> where did you hear this?

youtube and reddit

> are you having problems with your system?

no, i just want to have the best system possible

Turbocapitalist 04-16-2024 11:18 AM

Quote:

Originally Posted by How_To_Linux (Post 6496351)
youtube and reddit

Oh my. Neither of those, especially the latter, are sources of reliable technology advice if I may push understatement to the limits.

BtrFS was mentioned. What you might do is compare BtrFS with OpenZFS, since they are most like each other.

Then compare EXT4 with XFS since they are most like each other.

After that if you're still feeling adventurous compare Ceph with (deprecated) OpenAFS.

Comparing EXT4 with OpenZFS would be comparing technologies which are too dissimilar for the comparison to be of much use.

How do you plan to actually use your storage? How many systems or drives are involve and how many people? Those factors will steer you in one direction or another. If it's for just an off-the-shelf laptop for home or average work use, then EXT4 is the mostly likely outcome.

wpeckham 04-16-2024 11:22 AM

I ran tests (12 years ago now: LORD I am getting OLD!) using EXT4, EXT3, BTRFS (it was not widely used yet then and has been improved a LOT since), XFS, RaiserFS4, ZFS, and one other I forget. Where appropriate MDMADM RAID-5 was in play.
Mine was a DATABASE APPLICATION using a proprietary in-house database engine with massive client users (emulated).
I found EXT4/LVM/MDADM performed best for that application.
ZFS might have performed better, but there was not support for it in the kernel so it was not running at kernel priority.
All of them did well enough to be used in production, but ZFS and BTRFS dragged on some operation involving simultaneous access to several big files and hundreds of small ones at once. XFS and Raiser could corrupt under some loads, but performed well until then. None of them came up to the speeds EXT4 would maintain, but ZFS was pretty close.

The things is that performance depends upon the hardware and application, and the OS I/O buffer operation, as much as the FS drivers and file system. Testing must be specific to your use and hardware to have real meaning.

If you are not seeing issues and your performance is adequate, breaking it makes no sense.
BTRFS has become more performant since then, and if you do not need RAID-5/6 is about as stable and is a good option for normal use. EXT4 if you need better speed. ZFS only if you are making a file server or have other application that is is specifically good at by design.

TB0ne 04-16-2024 12:56 PM

Quote:

Originally Posted by How_To_Linux (Post 6496351)
> where did you hear this?
youtube and reddit

YouTube isn't reliable for such things, and again who is TELLING YOU that you need to switch??
Quote:

> are you having problems with your system?
no, i just want to have the best system possible
As soon as you can define "best", we can help you. But you need to actually do some research of your own first, rather than just stabbing at everything you hear. Look up what ZFS is and why it exists, and ask yourself if it is something you need. If you've got a bunch of unused disk, what's the point??? You don't need to be able to dynamically add disks to a pool, do you??? If you ARE running out and you're on a laptop, what difference is ZFS going to make, if you only have room for one drive??

Ask yourself logical questions about your setup and what your goals are.

pan64 04-16-2024 01:01 PM

Quote:

Originally Posted by How_To_Linux (Post 6496351)
i just want to have the best system possible

If you don't know zfs/ext4/whatever don't use it. Or learn it first. You need to be familiar with your own system. The better you know your system, the better you will be able to use it. Nothing will be better than your own if you get to know it well.

boughtonp 04-16-2024 01:06 PM

Quote:

Originally Posted by How_To_Linux (Post 6496350)
normally i would agree with you, but ...

No buts needed - that's a perfectly sane policy.

It's not impossible that I'm wrong, but it's far more likely that the idiots on YouTube and Reddit are wrong.


Quote:

i just want to have the best system possible
There's that misleading B-word again. There is no "best" without criteria.

There is almost never a "best at everything" because many properties are mutually exclusive, and different things matter more/less in different situations.

If you don't know what criteria matters to you, that's what you need to figure out first, generally by identifying a problem: "X isn't good enough because ..." and then there's something concrete to improve.


jefro 04-16-2024 03:09 PM

I tend to use the filesystem that the distro has by default. A lot of them use either.
They have quite different features. In some ways ZFS is superior.

Web site Phoronix tests distro's and kernels and filesystems for some starting point to decide.

How_To_Linux 04-16-2024 03:20 PM

Quote:

Originally Posted by Turbocapitalist (Post 6496359)
Oh my. Neither of those, especially the latter, are sources of reliable technology advice if I may push understatement to the limits.

BtrFS was mentioned. What you might do is compare BtrFS with OpenZFS, since they are most like each other.

Then compare EXT4 with XFS since they are most like each other.

After that if you're still feeling adventurous compare Ceph with (deprecated) OpenAFS.

Comparing EXT4 with OpenZFS would be comparing technologies which are too dissimilar for the comparison to be of much use.

How do you plan to actually use your storage? How many systems or drives are involve and how many people? Those factors will steer you in one direction or another. If it's for just an off-the-shelf laptop for home or average work use, then EXT4 is the mostly likely outcome.

> How do you plan to actually use your storage?

just for my personal use for myself


> How many systems or drives are involve and how many people?

1 computer, i have multiple external drives that i encrypt, and for only myself

How_To_Linux 04-16-2024 03:22 PM

Quote:

Originally Posted by TB0ne (Post 6496390)
YouTube isn't reliable for such things, and again who is TELLING YOU that you need to switch??

As soon as you can define "best", we can help you. But you need to actually do some research of your own first, rather than just stabbing at everything you hear. Look up what ZFS is and why it exists, and ask yourself if it is something you need. If you've got a bunch of unused disk, what's the point??? You don't need to be able to dynamically add disks to a pool, do you??? If you ARE running out and you're on a laptop, what difference is ZFS going to make, if you only have room for one drive??

Ask yourself logical questions about your setup and what your goals are.

> again who is TELLING YOU that you need to switch??

youtube and reddit

rclark 04-16-2024 03:32 PM

I'd just stick with ext4 then. Home users rarely need anything more for their systems in my opinion. It is 'simple' and to the point. Well supported. No extra commands to know or figure out. Just format partitions or drives and go. And plenty fast for and my/your use. I see all these 'fancy' file systems with features I'd never use like extending a disk to another disk. Really? I have 'plenty' of room on my 2TB drives. And keep good backups. I don't encrypt as I don't see a need to do so (just another layer of headaches for 'my' use). I do encrypt individual 'files' when needed however on the disks. Anyway, that's my opinion.

Youtube and reddit are mine fields of mis-information (and that goes for the AI garbage too). As pointed out above, you have to dig it out your self, evaluate in your head, and then make a decision. Just like voting, you can just listen to talking heads and nod/vote. Or dig out the truth behind the scenes and make an informed decision... :)

TB0ne 04-16-2024 04:10 PM

Quote:

Originally Posted by How_To_Linux (Post 6496428)
> again who is TELLING YOU that you need to switch??
youtube and reddit

Sorry, they're not. There is no one 'telling' anyone to use ZFS for no good reason. Again, you need to start *THINKING* about things rather than just stabbing at anything that comes along. You (AGAIN) need to do your own research on ZFS and ext and read about what they are, what they do, and why they exist. Because this:
Quote:

Originally Posted by How_To_Linux
> How do you plan to actually use your storage?
just for my personal use for myself

> How many systems or drives are involve and how many people?
1 computer, i have multiple external drives that i encrypt, and for only myself

...would indicate not much thought has gone into executing this plan. You've asked should you switch...you have been essentially told "no" several times, yet you persist, even after getting told that both of your 'reliable sources' aren't much good.

You have one computer, with external drives. What good, exactly, is ZFS in this case?? Are you going to put the external drives in a pool, and if you are, what do you think is going to happen when you UNPLUG one of those external drives?? This makes zero sense to do in your case.

AGAIN: unless you have a *SPECIFIC NEED* to use ZFS, what's the point, exactly???


All times are GMT -5. The time now is 09:35 AM.