You are not logged in.

#1 2009-01-17 17:04:44

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

[Solved] Disapointing ext4 fsck performance

Hi all,

Yesterday I converted my main partition to ext4, using the tune2fs + fsck method, and changing my partition type to ext4 in fstab. I thought one of the main points of ext4 was a faster fsck, however in my case the contrary is happening. I don't have any precise figures, but I would say an fsck takes about twice as long as before, in the order of several minutes for a 170GB partition with about 50GB of stuff on it.

Any insight? Is this normal or am I missing something?

Last edited by lardon (2009-01-22 13:28:25)


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#2 2009-01-17 17:08:36

zhuqin
Member
Registered: 2008-01-31
Posts: 61

Re: [Solved] Disapointing ext4 fsck performance

How about backing up your data, formatting the device with mkfs.ext4 and moving your data back?
If it's a root partition, you'd better looking for a latest rescue CD, for example, ubuntu 9.04.

Offline

#3 2009-01-17 17:12:19

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: [Solved] Disapointing ext4 fsck performance

I'd rather try to understand what's going on than lose a couple hours on something that's not even proven to improve the situation.


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#4 2009-01-17 17:45:41

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Solved] Disapointing ext4 fsck performance

zhuqin wrote:

How about backing up your data, formatting the device with mkfs.ext4 and moving your data back?
If it's a root partition, you'd better looking for a latest rescue CD, for example, ubuntu 9.04.

Arch installation CD doubles just fine as a rescue CD, it has the most common stuff on it smile. No need to pull in a 700 MB ISO for that.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2009-01-17 17:59:11

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: [Solved] Disapointing ext4 fsck performance

lardon wrote:

Hi all,

Yesterday I converted my main partition to ext4, using the tune2fs + fsck method, and changing my partition type to ext4 in fstab. I thought one of the main points of ext4 was a faster fsck, however in my case the contrary is happening. I don't have any precise figures, but I would say an fsck takes about twice as long as before, in the order of several minutes for a 170GB partition with about 50GB of stuff on it.

Any insight? Is this normal or am I missing something?

Did you turn on the required options? Here is my ext4 partition:

$ sudo tune2fs -l /dev/hdd1 | grep features
Filesystem features:      has_journal resize_inode dir_index filetype needs_recovery extent sparse_super large_file uninit_bg

And for comparison an ext3 partition:

$ sudo tune2fs -l /dev/hda6 | grep features
Filesystem features:      has_journal dir_index filetype needs_recovery sparse_super

If you don't enable uninit_bg, you won't get an fsck speedup. In addition, the first fsck will still run slow as it needs to figure out which block groups are in use. Subsequent fscks will run faster.

Offline

#6 2009-01-17 19:23:39

zhuqin
Member
Registered: 2008-01-31
Posts: 61

Re: [Solved] Disapointing ext4 fsck performance

B wrote:
zhuqin wrote:

How about backing up your data, formatting the device with mkfs.ext4 and moving your data back?
If it's a root partition, you'd better looking for a latest rescue CD, for example, ubuntu 9.04.

Arch installation CD doubles just fine as a rescue CD, it has the most common stuff on it smile. No need to pull in a 700 MB ISO for that.

No, it's not an official install CD, still uses kernel 2.6.27, and cannot even recognize an ext4 partition.
The official one is half a year old.

Offline

#7 2009-01-17 20:23:24

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: [Solved] Disapointing ext4 fsck performance

joel@mouton musique$ sudo tune2fs -l /dev/sda4 | grep features
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent sparse_super large_file uninit_bg

It seems I have all the required features... I also tried two fscks, but no luck, it goes a little faster but it's still very slow. How fast exactly is it supposed to be?

Last edited by lardon (2009-01-17 20:50:57)


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#8 2009-01-20 10:24:30

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: [Solved] Disapointing ext4 fsck performance

bump


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#9 2009-01-20 20:52:32

LTSmash
Member
From: Aguascalientes - Mexico
Registered: 2008-01-02
Posts: 348
Website

Re: [Solved] Disapointing ext4 fsck performance

Why don-t you try running your fsck with some verbosity so you can get a hint on why it-s taking longer..._


Proud Ex-Arch user.
Still an ArchLinux lover though.

Currently on Kubuntu 9.10

Offline

#10 2009-01-20 21:10:37

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [Solved] Disapointing ext4 fsck performance

I'm not sure if this question got asked yet. Did you convert your data over to use the new device mapping? Simply converting the hard disc isn't enough. I don't know if that's a factor, but I do know that fsck is way faster for me now.

Offline

#11 2009-01-22 13:28:09

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: [Solved] Disapointing ext4 fsck performance

skottish wrote:

I'm not sure if this question got asked yet. Did you convert your data over to use the new device mapping? Simply converting the hard disc isn't enough. I don't know if that's a factor, but I do know that fsck is way faster for me now.

mmm, no I didn't, since e4defrag is not available yet with the standard kernel. Well, I guess that settles my problem then! Thanks for the answer.


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#12 2009-01-23 21:34:45

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [Solved] Disapointing ext4 fsck performance

lardon wrote:
skottish wrote:

I'm not sure if this question got asked yet. Did you convert your data over to use the new device mapping? Simply converting the hard disc isn't enough. I don't know if that's a factor, but I do know that fsck is way faster for me now.

mmm, no I didn't, since e4defrag is not available yet with the standard kernel. Well, I guess that settles my problem then! Thanks for the answer.

Sorry I didn't respond sooner. I used the CK defrag script found here:

http://ck.kolivas.org/apps/defrag/defrag-0.06/defrag

which was found in post #62 here:

http://bbs.archlinux.org/viewtopic.php?id=61602

There's been some discussion around on whether defragging is a good idea or not, but I didn't see anyone fully explain why it's not. This is where I heard it from:

http://bbs.archlinux.org/viewtopic.php?id=63228

On my system, fsck use to take something like 4 minutes on my data discs with ext3. It now takes about 20 seconds with ext4. That includes recreating the lost+found folder, which for some reason seems to take a bit of time.

Offline

#13 2009-01-24 12:07:54

lardon
Member
Registered: 2008-05-31
Posts: 264
Website

Re: [Solved] Disapointing ext4 fsck performance

Are you sure the script is safe? I have lots of files with spaces/special characters and I decided to abort because I was getting errors...


Autojump, the fastest way to navigate your filesystem from the command line!

Offline

#14 2009-01-25 01:33:03

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [Solved] Disapointing ext4 fsck performance

lardon wrote:

Are you sure the script is safe? I have lots of files with spaces/special characters and I decided to abort because I was getting errors...

It worked fine for me. I do have a lot of files with spaces, but I don't believe that I have any with special characters. I didn't notice any errors at all when running the script outside of permission errors, which effectively kills the script.

Offline

Board footer

Powered by FluxBB