On 2014-07-02 16:12, James Knott wrote:
On 07/02/2014 07:31 AM, Carlos E. R. wrote:
If the file is not fragmented, then it should be as fast as a real partition.
How often are files fragmented? I thought the file systems used in Linux were fragmentation resistant.
Resistant, yes, but not immune. fsck tells you the amount. I have seen Linux machines heavily fragmented. Look: nimrodel:~ # fsck /dev/sdb1 fsck 1.40.8 (13-Mar-2008) e2fsck 1.40.8 (13-Mar-2008) Moria_250 has been mounted 1574 times without being checked, check forced. Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 3A: Optimizing directories Pass 4: Checking reference counts Pass 5: Checking group summary information Moria_250: ***** FILE SYSTEM WAS MODIFIED ***** Moria_250: 5872/30408704 files (62.6% non-contiguous), 34630399/60791960 blocks nimrodel:~ # See that 62.6%? That's heavy fragmentation. The disk belongs to a multimedia device that runs Linux (kernel 2.4.21), on an ext2 partition. To totally avoid fragmentation, you have to assign the full space for each file at the instant of creation, and separate files one from another sufficiently so that they can grow. When the disk gets quite filled, the strategy fails. It is possible to move about files while the system is running, if designed carefully. The easiest is to move unused files on iddle system periods - but I don't know of any operating system doing it. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)