Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Fragmentation of my drives. Curious mostly
Date: Fri, 26 Dec 2008 21:40:20
Message-Id: 49554F3B.6080905@gmail.com
In Reply to: [gentoo-user] Re: Fragmentation of my drives. Curious mostly by Nikos Chantziaras
1 Nikos Chantziaras wrote:
2 > Dale wrote:
3 >> Nikos Chantziaras wrote:
4 >>> OK, I once again verified that fragmentation seems to be a big issue
5 >>> even on Linux. I just migrated to ext4, and in order to do that I had
6 >>> to rsync, format and rsync back. The result is similar to the last
7 >>> time I did this (over 8 months ago):
8 >>>
9 >>> emerge --sync takes 15 seconds (at least 3 minutes yesterday)
10 >>> update-eix takes 2 seconds (20 seconds yesterday)
11 >>>
12 >>> And I don't believe it's due to ext4. It's a nice speed-up from ext3,
13 >>> but not THAT nice.
14 >>
15 >> Well, try as I may, I could not get mine past 10% on resiserfs.
16 >> Fragmentation happens on any file system but I think the point is that
17 >> Linux doesn't get as bad as the windoze file system. 10% or so is not
18 >> to bad depending on the size of the files. Files that are large will
19 >> have to be fragmented no matter what file system you use.
20 >> I posted in another the reply right after a copy to another drive. I
21 >> think that was before I even booted into the OS and was still on the
22 >> CD. It is around 2% or so. I doubt given that condition that it could
23 >> get any better.
24 >
25 > I think the main problem may not be so much fragmentation of files,
26 > but rather their position on disk. Even if files are not fragmented,
27 > if they are located too far from each other even though they're
28 > related (same directory for example) or there's simply too much empty
29 > space between files (I think this is intentional in order to reduce
30 > fragmentation) then seek times get really bad. After I rsync the data
31 > back, it's nicely and sequentially laid out on disk. I guess over
32 > time it starts to get further apart again (to combat fragmentation)
33 > and emerge --sync goes up from 15 seconds to 2 minutes again. Even
34 > though the files aren't fragmented at all.
35 >
36 > Some defrag apps for Windoze actually offer to put the files back
37 > closer together without trying to defragment at all. I guess this is
38 > why :P
39 >
40 >
41 >
42
43
44 Well, this is what I got on my rig. Sort of interesting in a way.
45
46 root@smoker / # mount
47 /dev/hda6 on / type reiserfs (rw)
48 /proc on /proc type proc (rw)
49 sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
50 udev on /dev type tmpfs (rw,nosuid)
51 devpts on /dev/pts type devpts (rw,nosuid,noexec)
52 /dev/hda1 on /boot type ext2 (rw)
53 /dev/hda7 on /home type reiserfs (rw)
54 /dev/hda8 on /usr/portage type ext2 (rw)
55 /dev/hda9 on /data type reiserfs (rw)
56 none on /dev/shm type tmpfs (rw)
57 usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
58 binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
59 (rw,noexec,nosuid,nodev)
60 /dev/hdd on /media/hdd type udf
61 (rw,noexec,nosuid,nodev,uid=0,gid=0,umask=007)
62 root@smoker / #
63
64 root@smoker / # /root/fragck.pl /
65 3.10978840211776% non contiguous files, 1.08156705459019 average fragments.
66 root@smoker / # /root/fragck.pl /usr/portage/
67 0.0276657266269232% non contiguous files, 1.00029450612216 average
68 fragments.
69 root@smoker / # /root/fragck.pl /boot/
70 6.25% non contiguous files, 1.0625 average fragments.
71 root@smoker / # /root/fragck.pl /home/
72 3.2440588457186% non contiguous files, 1.16408902301018 average fragments.
73 root@smoker / # /root/fragck.pl /data/
74 5.56267766568196% non contiguous files, 1.06797837355777 average fragments.
75 root@smoker / #
76
77 Now keep in mind that the first one includes all the others. I'm logged
78 into a GUI so I can't umount /home at least. May do that in single mode
79 someday.
80
81 I think sometimes the files are just to big to fit on one section. I
82 know I have some files that are pretty big. I got a couple videos that
83 are big that came off my camera and one video that is a hour or so
84 long. I think there are a lot of variables that without a microscope we
85 can never see and know for sure.
86
87 Dale
88
89 :-) :-)