Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ext4 reserved space and defragmentation?
Date: Sun, 27 Jun 2010 09:24:04
Message-Id: 4C27187D.2050100@gmail.com
In Reply to: Re: [gentoo-user] ext4 reserved space and defragmentation? by Stroller
1 Stroller wrote:
2 >
3 > I'm pretty sure that just means that Linux will try to put files in
4 > contiguous sectors, so they're not fragmented, and that as you run out
5 > of space it's generally harder to do that.
6 >
7 > But I would imagine this is particularly the case with the occasional
8 > large file on a typical filesystem cluttered with small files - if you
9 > have a 1TB drive and save 9 100GB movie files on it, the remaining
10 > free space is going to be contiguous, anyway.
11 >
12 > Whilst it would be interesting to do some real world testing on big
13 > hard drives fulla porn, you can safely set the reserved space to 0%
14 > and forget about it. That message has been there since ext2 and if you
15 > streaming suddenly starts to stutter when your filesystem is 99% full,
16 > well, you were going to add another drive to the array, anyway,
17 > weren't you? Add it in and expand the filesystem and see if that makes
18 > any difference.
19 >
20 > Interestingly, I've just done an fsck on my ext4 media array and it
21 > shows as 83.8% non-contiguous. It is 1.4TB with 272G or 19% free. I
22 > can only assume this is because I also use it for backups, and have a
23 > couple of directories on there of many much smaller files.
24 >
25 > Stroller.
26 >
27 >
28 >
29
30 I have a 750Gb drive that I put mostly movies on. I have NCIS and some
31 that I got from youtube of old TV shows plus some regular files like OOo
32 docs. I just ran fragck on that a while ago and got this:
33
34 72.499201913381% non contiguous files, 2.38433317962776 average fragments.
35
36 I also have my /boot partition which has a few kernels on it and their
37 config files. I get this for that partition:
38
39 78.4313725490196% non contiguous files, 4.72549019607843 average fragments.
40
41 Both of those have lots of free space still. About half way on the
42 750Gb drive and 75% free space on /boot. I cleaned it out a while back
43 and got rid of some old kernels and configs.
44
45 My freshly copied /usr directory comes in as this:
46
47 3.52929844927837% non contiguous files, 0.524852607939654 average fragments.
48
49 That includes the portage tree by the way. However, there is not much
50 difference when portage is unmounted either. Again, freshly copied just
51 this morning and only synced once so far.
52
53 I just freshly transfered my OS from one drive to another. /boot and
54 the data drive was untouched tho. I don't have a place large enough to
55 transfer my data partition. My question is this, isn't there a point
56 where there will be fragmentation no matter what file system you use?
57 After all, some files are going to be fragmented because of size and
58 some are going to be fragmented because they are edited and such.
59
60 By the way, resierfs for everything except /boot and portage which uses
61 ext2 and ext3 respectively.
62
63 Dale
64
65 :-) :-)