summaryrefslogtreecommitdiff
path: root/sag-0.6.1-www/Invisible/sag-0.6/node49.html
blob: 190bc21c3f5538c03c5c24ed4400c4a4944e7605 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>Fighting fragmentation</TITLE>
<META NAME="description" CONTENT="Fighting fragmentation">
<META NAME="keywords" CONTENT="sag">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<LINK REL=STYLESHEET HREF="sag.css">
</HEAD>
<BODY LANG="EN" >
 <A NAME="tex2html933" HREF="node50.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html931" HREF="node41.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html925" HREF="node48.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html935" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html936" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html934" HREF="node50.html">Other tools for all </A>
<B>Up:</B> <A NAME="tex2html932" HREF="node41.html">Filesystems</A>
<B> Previous:</B> <A NAME="tex2html926" HREF="node48.html">Checking for disk errors </A>
<BR> <P>
<H2><A NAME="SECTION00588000000000000000">Fighting fragmentation</A></H2>
<P>
	When a file is written to disk, it can't always be written
	in consecutive blocks.  A file that is not stored in 
	consecutive blocks is <b>fragmented</b>.  It takes longer
	to read a fragmented file, since the disk's read-write head
	will have to move more.  It is desireable to avoid fragmentation,
	although it is less of a problem in a system with a good buffer
	cache with read-ahead.
<P>
	The ext2 filesystem attempts to keep fragmentation at a minimum,
	by keeping all blocks in a file close together, even if they
	can't be stored in consecutive sectors.  Ext2 effectively always
	allocates the free block that is nearest to other blocks in a file.
	For ext2, it is therefore seldom necessary to worry about
	fragmentation.  There is a program for defragmenting an ext2
	filesystem, see&nbsp;[<A HREF="node113.html#ext2-defrag">TV</A>] in the bibliography.
<P>
	There are many MS-DOS defragmentation programs that move blocks
	around in the filesystem to remove fragmentation.  For other
	filesystems, defragmentation must be done by backing up the
	filesystem, re-creating it, and restoring the files from backups.
	Backing up a filesystem before defragmening is a good idea
	for all filesystems, since many things can go wrong during
	the defragmentation.
<P>
<BR> <HR>
<P><ADDRESS>
<I>Lars Wirzenius <BR>
Sat Nov 15 02:32:11 EET 1997</I>
</ADDRESS>
</BODY>
</HTML>