Re: Does "32.1% non-contiguous" mean severely fragmented?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Theodore Tso wrote:
> Secondly, what results do you get when you run the command "hdparm -tT
> /dev/sda" (or /dev/hda if you are using an IDE disk)?

[root@sakura Ubuntu7.10]# hdparm -tT /dev/hda1 

/dev/hda1:
 Timing cached reads:   10384 MB in  2.00 seconds = 5196.44 MB/sec
 Timing buffered disk reads:  116 MB in  3.02 seconds =  38.36 MB/sec

[root@sakura Ubuntu7.10]# hdparm -tT /dev/hda1

/dev/hda1:
 Timing cached reads:   10572 MB in  2.00 seconds = 5291.32 MB/sec
 Timing buffered disk reads:  118 MB in  3.04 seconds =  38.83 MB/sec

BIOS setting says it uses AHCI mode.

> First of all, what does the "filefrag" program (shipped as part of
> e2fsprogs, not included in some distributions) say if you run it as
> root on your VM data file?

Here is the result of "filefrag". *-f???*.vmdk is splitted in 2 GB each.

[root@sakura Ubuntu7.10]# filefrag *
Ubuntu7.10-0: 1 extent found
Ubuntu7.10-f001.vmdk: 151 extents found, perfection would be 18 extents
Ubuntu7.10-f002.vmdk: 36 extents found, perfection would be 18 extents
Ubuntu7.10-f003.vmdk: 5 extents found, perfection would be 1 extent
Ubuntu7.10.nvram: 1 extent found
Ubuntu7.10.vmdk: 1 extent found
Ubuntu7.10.vmsd: 1 extent found
Ubuntu7.10.vmx: 1 extent found
Ubuntu7.10.vmxf: 1 extent found
Ubuntu7.10.vmx.lck: Not a regular file
Ubuntu7-f001.10-0: 167 extents found, perfection would be 18 extents
Ubuntu7-f002.10-0: 68 extents found, perfection would be 18 extents
Ubuntu7-f003.10-0: 20 extents found, perfection would be 18 extents
Ubuntu7-f004.10-0: 93 extents found, perfection would be 18 extents
Ubuntu7-f005.10-0: 316 extents found, perfection would be 18 extents
Ubuntu7-f006.10-0: 27 extents found, perfection would be 18 extents
Ubuntu7-f007.10-0: 21 extents found, perfection would be 18 extents
Ubuntu7-f008.10-0: 20 extents found, perfection would be 18 extents
Ubuntu7-f009.10-0: 78 extents found, perfection would be 18 extents
Ubuntu7-f010.10-0: 22 extents found, perfection would be 18 extents
Ubuntu7-f011.10-0: 47 extents found, perfection would be 1 extent
vmware-0.log: 4 extents found, perfection would be 1 extent
vmware-1.log: 3 extents found, perfection would be 1 extent
vmware-2.log: 15 extents found, perfection would be 1 extent
vmware.log: 3 extents found, perfection would be 1 extent

Yes, there are some discontiguous, but the ratio is not so high when considering their file size.


Regarding 512MB-sized suspend image, it has more higher ratio of discontiguous, as shown below.

When I just power on and suspend at grub, the extent is smaller than perfection.
They would be sparse image (memory is allocated but not all memory is accessed).
But when I do some operation after login, it yeilds more discontiguous.


--- Start VM ---
--- Suspend VM ---
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 1 extent found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 14 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 14 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# sync
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 17 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 17 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# sync
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 17 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 17 extents found, perfection would be 5 extents
--- Resume and poweroff VM ---

--- Start VM ---
--- Suspend VM ---
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 751 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# sync
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 3281 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 3281 extents found, perfection would be 5 extents
--- Resume and poweroff VM ---

What? "sync" yields more discontiguous?

--- Start VM ---
--- Suspend VM ---
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 10 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# sync
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 482 extents found, perfection would be 5 extents
--- Resume and poweroff VM ---

--- Start VM ---
--- Suspend VM ---
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 8 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# sync
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 19 extents found, perfection would be 5 extents
--- Resume and poweroff VM ---

--- Start VM ---
--- Suspend VM ---
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 8 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# sync
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 11 extents found, perfection would be 5 extents
--- Resume and poweroff VM ---

--- Start VM ---
--- Suspend VM ---
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 1 extent found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 1 extent found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# sync
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 3 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 3 extents found, perfection would be 5 extents
--- Resume and poweroff VM ---

--- Start VM ---
--- Suspend VM ---
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 629 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 629 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# sync
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 2715 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 2760 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# sync
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 2769 extents found, perfection would be 5 extents
[root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem
Ubuntu7.10.vmem: 2769 extents found, perfection would be 5 extents
--- Resume and poweroff VM ---

As I repeated, it seems that the ratio of discontiguous depends on
both "the location of file data allocated on the filesystem"
and "the content of VM's memory".

I don't know how many discontiguous were there when suspend/resume took many minutes.
But I guess the ratio was very high.

Your "filefrag" command is a very good tool!

Thank you.

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux