2010-11-28 21:16:04

by linux_ext4

[permalink] [raw]
Subject: convert from ext3 versus fresh format

Hi list,

I have a production system installed on an SSD, whose installer formats
the target drive as ext3 automatically. I've since learned that ext4 is
more suited for use on SSDs and am considering an upgrade to ext4.

I see the procedure on how to convert from ext3 to ext4 on the wiki, and
before I proceed would like to know whether there's an advantage to
formatting as ext4 from the start as opposed to converting after an ext3
format.

In the case that there is a difference, what exactly is sacrificed in
choosing one over the other?

Regards,

-C



2010-11-29 05:51:23

by Andreas Dilger

[permalink] [raw]
Subject: Re: convert from ext3 versus fresh format

On 2010-11-28, at 14:16, [email protected] wrote:
> I have a production system installed on an SSD, whose installer formats
> the target drive as ext3 automatically. I've since learned that ext4 is
> more suited for use on SSDs and am considering an upgrade to ext4.
>
> I see the procedure on how to convert from ext3 to ext4 on the wiki, and
> before I proceed would like to know whether there's an advantage to
> formatting as ext4 from the start as opposed to converting after an ext3
> format.

It is possible to use the ext4 filesystem code on ext3-formatted filesystems without any conversion being done. Enabling extents will improve performance, and uninit_bg will improve e2fsck performance.

You wouldn't be able to take advantage of flex_bg without reformatting (or some significant surgery to resize2fs).

If the inodes are "large" (256 bytes) then mounting the filesystem with ext4 will allow the inodes to use nanosecond timestamps.

> In the case that there is a difference, what exactly is sacrificed in
> choosing one over the other?

Reformatting and reinstalling and/or restoring from backup into an ext4-formatted filesystem will allow using a few of the features lay out the files with extents, and reduce the metadata overhead. There will be some performance benefits, but I don't think it will necessarily be dramatic.

Cheers, Andreas






2010-11-29 05:52:34

by Michael Rubin

[permalink] [raw]
Subject: Re: convert from ext3 versus fresh format

On Sun, Nov 28, 2010 at 1:16 PM, <[email protected]> wrote:
> I see the procedure on how to convert from ext3 to ext4 on the wiki, and
> before I proceed would like to know whether there's an advantage to
> formatting as ext4 from the start as opposed to converting after an ext3
> format.

We are seeing sizeable improvement on formatting ext4 vs converting
from ext2 on magnetic platters.

I would expect SSDs would also see an improvement due to extents for
ext4 on new files and having no indirect blocks to deal with from
ext3. While the cheaper seeks will make some of the improvements less
impactful, the fewer accesses should help a lot.

Also I don't think an upgrade allows for flex block groups while a
format will. This is something you might want to consider also
depending on how much you want to tune.

> In the case that there is a difference, what exactly is sacrificed in
> choosing one over the other?

AFAIK the only thing sacrificed in formatting vs upgrade is that you
have to preserve your data. If you don't have this concern I would
format cleanly.

mrubin

2010-11-29 17:30:19

by Greg Freemyer

[permalink] [raw]
Subject: Re: convert from ext3 versus fresh format

On Sun, Nov 28, 2010 at 4:16 PM, <[email protected]> wrote:
> Hi list,
>
> I have a production system installed on an SSD, whose installer formats
> the target drive as ext3 automatically. I've since learned that ext4 is
> more suited for use on SSDs and am considering an upgrade to ext4.

If your only driver is SSD discard capability, then use the ext4
driver to work with your ext3 partition. (It's backward compatible.)

Then I would recommend you use the userspace tool wiper.sh / hdparm to
do a once a week or so discard of freespace.

I maintain a page about discard for opensuse that you might find worth reading:
http://en.opensuse.org/SDB:SSD_discard_%28trim%29_support

Greg