FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 02-14-2008, 01:22 PM
Thomas Kahle
 
Default Linux, reiserfs and file fragmentation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, just one more idea that came to my mind,

reiserfs uses a technique to save small files in the filesystem tree
which uses less disk space then. In ext3 a 1 byte file will take up 4k,
while this is not the case in reiserfs.
This yields a performace hit of about 5% (people say, not that i have
measured anything)

If you have enough free space you can disable this, make the small files
consume more space again and gains some speed improvement.

Another thing you could do is disable the writing of accesstimes.
Read man mount how to do this. The mount options are noatime,notail.

Concerning your observation I would start looking at how the
fragmentation is measured.
Maybe this also depends on the filesystem implementation in the kernel.
Anyway:
you can not get much better 1.043.. parts per file. This means that
almost every file(96,12 % in your case) is contiguous.

have fun

|>
|
| I did a little test. Something fishy here. I did a test with the /data
| partition. I store pictures and documents there and it was fragmented.
| I cp -av to another reiserfs formatted partition then remade the file
| system and copied it back using basically the same command just in
| reverse. This is what I got now:
|
| root@smoker / # /root/fragck.pl /data/
| 3.88457269700333% non contiguous files, 1.04344379261138 average
fragments.
| root@smoker / #
|
| That is not a lot better than it was before. It was 4.6% before. How
| is that? I copied it over then ran the command right after without even
| touching the files.
| Any ideas? Is there a limit to the fragmenting "smallness"?
|
| Dale
|
| :-) :-)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHtE6PrpEWPKIUt7MRAoAhAJ4wJ1Ygs7A75ayFCIAs+u XjW+uUbwCfdeaB
rDCDg4kPoAfrKbMUZdJ/EdU=
=WkET
-----END PGP SIGNATURE-----
--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-14-2008, 01:51 PM
Uwe Thiem
 
Default Linux, reiserfs and file fragmentation

On Thursday 14 February 2008, Dale wrote:

> I did a little test. Something fishy here. I did a test with the
> /data partition. I store pictures and documents there and it was
> fragmented. I cp -av to another reiserfs formatted partition then
> remade the file system and copied it back using basically the same
> command just in reverse. This is what I got now:
>
> root@smoker / # /root/fragck.pl /data/
> 3.88457269700333% non contiguous files, 1.04344379261138 average
> fragments. root@smoker / #
>
> That is not a lot better than it was before. It was 4.6% before.
> How is that? I copied it over then ran the command right after
> without even touching the files.

Before you copy back, you have to "clean" the old partition - either
by deleting everything or by partioning it.

Uwe

--
Informal Linux Group Namibia:
http://www.linux.org.na/
SysEx (Pty) Ltd.:
http://www.SysEx.com.na/
--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-14-2008, 02:25 PM
Dale
 
Default Linux, reiserfs and file fragmentation

Uwe Thiem wrote:

On Thursday 14 February 2008, Dale wrote:



I did a little test. Something fishy here. I did a test with the
/data partition. I store pictures and documents there and it was
fragmented. I cp -av to another reiserfs formatted partition then
remade the file system and copied it back using basically the same
command just in reverse. This is what I got now:

root@smoker / # /root/fragck.pl /data/
3.88457269700333% non contiguous files, 1.04344379261138 average
fragments. root@smoker / #

That is not a lot better than it was before. It was 4.6% before.
How is that? I copied it over then ran the command right after

without even touching the files.



Before you copy back, you have to "clean" the old partition - either
by deleting everything or by partioning it.


Uwe




I just did a mkreiserfs /dev/hdb1. That should work right?

Dale

:-) :-)
--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-14-2008, 02:42 PM
Dale
 
Default Linux, reiserfs and file fragmentation

Daniel Iliev wrote:

On Thu, 14 Feb 2008 06:01:16 -0600
Dale <dalek1967@bellsouth.net> wrote:



Michal 'vorner' Vaner wrote:


Hello

On Thu, Feb 14, 2008 at 05:06:43AM -0600, Dale wrote:



My questions; is this badly fragmented? How can I "unfragment"
all the files and not bork something up badly?
My opinion on this tho, considering this install is about 4 years

old, not to bad. I've seen worse on a windoze rig shortly after a
install. ;-)


I would guess the fragmented files are the big ones. And, with
average of 2 fragments per file, it is not too much. If you have a
movie with 30MB fragments, then it is no problem.

Unless you hear lot of rattling noise from the HDD, you could leave
it as is.

And the surest way to defragment a filesystem is take everything
out and put it back again. It will write the files one after
another and will have no reason to split them.




So if for example I copied everything over to a different hard drive
and then copied everything back, it would be "defragmented" then?

I would think of something like this:

Boot some live CD.
Mount old and backup drives.
Copy old drive to a backup drive using cp -av yada yada.
Make a new file system on the old drive to make sure all is clean.
Copy everything back over from the backup to the old drive using cp
-av yada yada.

I would also take the opportunity to redo a few partitions while I
was able to.

The biggest slow down by the way is when logging into KDE the first
time. It takes a long while and that drive is just a getting it.

The light just stays on while loading everything up.

Your thoughts and others if needed.

Dale

:-) :-) :-)







If you haven't already done this, you could try [1] for faster KDE boot.
I believe it'll bring you much bigger application start-up boost than
defragmenting your FS.

Please, notice that I'm not saying that defragmentation is pointless.
Just the opposite: I believe fragmentation leads to a perceivable (and
actually measurable) performance hit.


[1] http://www.gentoo.org/doc/en/prelink-howto.xml





Now I remember why I stopped using prelink:

"The only maintenance required is re-running prelink every time a
library is upgraded for a pre-linked executable."


I knew there was a reason I stopped. I never could remember to run it
after I finished emerging stuff.


It was a thought tho.

Dale

:-) :-)
--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-14-2008, 03:08 PM
Uwe Thiem
 
Default Linux, reiserfs and file fragmentation

On Thursday 14 February 2008, Dale wrote:
> Uwe Thiem wrote:
> > On Thursday 14 February 2008, Dale wrote:
> >> I did a little test. Something fishy here. I did a test with
> >> the /data partition. I store pictures and documents there and
> >> it was fragmented. I cp -av to another reiserfs formatted
> >> partition then remade the file system and copied it back using
> >> basically the same command just in reverse. This is what I got
> >> now:
> >>
> >> root@smoker / # /root/fragck.pl /data/
> >> 3.88457269700333% non contiguous files, 1.04344379261138 average
> >> fragments. root@smoker / #
> >>
> >> That is not a lot better than it was before. It was 4.6%
> >> before. How is that? I copied it over then ran the command
> >> right after without even touching the files.
> >
> > Before you copy back, you have to "clean" the old partition -
> > either by deleting everything or by partioning it.
> >
> > Uwe
>
> I just did a mkreiserfs /dev/hdb1. That should work right?

Actually, I meant "by formatting it" instead of "partioning". So yes,
that should work.

Maybe fragch.pl is simply buggy.

Uwe

--
Informal Linux Group Namibia:
http://www.linux.org.na/
SysEx (Pty) Ltd.:
http://www.SysEx.com.na/
--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-14-2008, 03:14 PM
Uwe Thiem
 
Default Linux, reiserfs and file fragmentation

On Thursday 14 February 2008, Dale wrote:

> Now I remember why I stopped using prelink:
>
> "The only maintenance required is re-running prelink every time a
> library is upgraded for a pre-linked executable."

I only prelink after major updates. Never had any problems in between.

>
> I knew there was a reason I stopped. I never could remember to run
> it after I finished emerging stuff.
>
> It was a thought tho.

Leave the "a" option ou, and it prelinks only stuff that needs
prelinking.

You can force automatic prelinking in /etc/conf.d/prelink.

Uwe


Informal Linux Group Namibia:
http://www.linux.org.na/
SysEx (Pty) Ltd.:
http://www.SysEx.com.na/
--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-14-2008, 04:59 PM
Alan McKinnon
 
Default Linux, reiserfs and file fragmentation

On Thursday 14 February 2008, Dale wrote:
> I did a little test. *Something fishy here. *I did a test with the
> /data partition. *I store pictures and documents there and it was
> fragmented. I cp -av to another reiserfs formatted partition then
> remade the file system and copied it back using basically the same
> command just in reverse. *This is what I got now:
>
> root@smoker / # /root/fragck.pl /data/
> 3.88457269700333% non contiguous files, 1.04344379261138 average
> fragments. root@smoker / #
>
> That is not a lot better than it was before. *It was 4.6% before.
> *How is that? *I copied it over then ran the command right after
> without even touching the files.
>
> Any ideas? *Is there a limit to the fragmenting "smallness"?

Don't worry about fragmentation on reiserfs. This is not a valid concept
for reiser or for ext2/3.

Fragmentation is problematic on Windows machines because that code is
brain dead. Some people seem to assume that it must therefore be
problematic on all file systems. Reiserfs is not brain dead, it is
intelligent and will balance itself out over time. It also has tail
packing which can make fragmentation stats look odd if enabled.

Short answer:

Don't worry about it. Let reiserfs do what it wants to do when it wants
to do it - it is much much much better at these decisions than you will
ever be ;-)

--
Alan McKinnon
alan dot mckinnon at gmail dot com

--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-14-2008, 05:01 PM
Alan McKinnon
 
Default Linux, reiserfs and file fragmentation

On Thursday 14 February 2008, Uwe Thiem wrote:
> Yes, everything will be defragmented. In addition, it will leave gaps
> between files. So if a file lateron grows it will not immediately
> fragment.

Which will cause a stupid script to report fragmentation if the author
does not understand file system structure...

--
Alan McKinnon
alan dot mckinnon at gmail dot com

--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-14-2008, 05:03 PM
Volker Armin Hemmann
 
Default Linux, reiserfs and file fragmentation

On Donnerstag, 14. Februar 2008, Dale wrote:

>
> Now I remember why I stopped using prelink:
>
> "The only maintenance required is re-running prelink every time a
> library is upgraded for a pre-linked executable."
>
> I knew there was a reason I stopped. I never could remember to run it
> after I finished emerging stuff.

prelink runs by cron - not after every emerge. That is reallye enough.

--
gentoo-user@lists.gentoo.org mailing list
 
Old 02-14-2008, 05:34 PM
Dale
 
Default Linux, reiserfs and file fragmentation

Volker Armin Hemmann wrote:

On Donnerstag, 14. Februar 2008, Dale wrote:



Now I remember why I stopped using prelink:

"The only maintenance required is re-running prelink every time a
library is upgraded for a pre-linked executable."

I knew there was a reason I stopped. I never could remember to run it
after I finished emerging stuff.



prelink runs by cron - not after every emerge. That is reallye enough.




May have to check this out again then, now that a cron can "remember" to
prelink again. LOL


Dang I'm getting old. :-(


Dale

:-) :-) :-)
--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 06:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org