Ubuntu VMDK Fragmentation and Vmware allocation size?
I run vmware workstation 6.1 on my laptop and use a ubuntu VM in it. The vmdk is setup to use sparse files with max extent 2GB (vmdk file described below). I started with the ubuntu server which is very minimal and then installed ubuntu-xdesktop on it. The xdesktop package installed close to a 1000 packages and expanded the sparse disk a lot. Here is a result of running windows defrag (start–>programs–>accessories–>system tools–>disk defragmenter)
Fragments File Size Most fragmented files
202 1.56 GB workvmu1u1-s001.vmdk
So it has 202 fragments. 1.56GB/202 ~ 84MB.
The logical allocation units can be
- grain: of the grainsize = 128 sectors or 64KB.
- grain table: Pointers to 512 grains are stored in a grain table. thus the grain table covers about 32Mb. Looks like it would allocate 2 graintable?
It is possible it allocates a grain-table worth of data at one time (although may not be used for the same grain table) and the underlying OS as it got more fragmented could have split single allocations into more than one fragments.
Complete Fragmentation Report
Volume (C:)
Volume size = 74.46 GB
Cluster size = 4 KB
Used space = 60.42 GB
Free space = 14.04 GB
Percent free space = 18 %
Volume fragmentation
Total fragmentation = 19 %
File fragmentation = 38 %
Free space fragmentation = 0 %
File fragmentation
Total files = 332,864
Average file size = 293 KB
Total fragmented files = 11,312
Total excess fragments = 57,361
Average fragments per file = 1.17
Pagefile fragmentation
Pagefile size = 2.00 GB
Total fragments = 1
Folder fragmentation
Total folders = 78,930
Fragmented folders = 2,309
Excess folder fragments = 8,623
Master File Table (MFT) fragmentation
Total MFT size = 416 MB
MFT record count = 412,420
Percent MFT in use = 96 %
Total MFT fragments = 3
——————————————————————————–
Fragments File Size Most fragmented files
3,542 555 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP360A0064665.exe
1,791 214 MB workdownload7.0-RELEASE-i386-livefs.iso
1,768 695 MB workdownload7.0-RELEASE-i386-disc2.iso
1,022 509 MB workdownload7.0-RELEASE-i386-disc1.iso
849 8 MB Documents and SettingsrosenLocal SettingsTempdd_NET_Framework20_Setup02DE.txt
790 352 MB workdownload7.0-RELEASE-i386-disc3.iso
470 237 MB workdownload7.0-RELEASE-i386-docs.iso
440 27 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP344A0062479.reg
347 22 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP377A0070304.old
329 21 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP343A0062133.reg
291 1 KB WINDOWSsystem32configsystem.LOG
285 3 MB Program FilesMicrosoft SQL Server100Setup BootstrapLogVSExpress_9.0sql_engine_core_shared_Cpu32_1.log
263 16 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP344A0062478.reg
252 16 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP343A0062132.reg
247 15 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP359A0064513.exe
218 14 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP359A0064400.rbf
202 1.56 GB workvmu1u1-s001.vmdk
182 11 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP384A0071645.dll
182 13 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP349A0063506.rbf
179 20 MB WINDOWSpfirewall.log
174 11 MB System Volume Information_restore{46DE8921-1D39-44D2-A9E9-64119261F211}RP343A0061844.rbf
u1.vmdk descriptor file
# Disk DescriptorFile
version=1
encoding=”windows-1252″
CID=d23aac87
parentCID=ffffffff
createType=”twoGbMaxExtentSparse”
# Extent description
RW 4192256 SPARSE “u1-s001.vmdk”
RW 4192256 SPARSE “u1-s002.vmdk”
RW 4192256 SPARSE “u1-s003.vmdk”
RW 4192256 SPARSE “u1-s004.vmdk”
RW 8192 SPARSE “u1-s005.vmdk”
# The Disk Data Base
#DDB
ddb.virtualHWVersion = “7″
ddb.uuid = “60 00 C2 98 55 91 80 6d-aa c9 e9 78 bd b7 51 f4″
ddb.geometry.cylinders = “1044″
ddb.geometry.heads = “255″
ddb.geometry.sectors = “63″
ddb.adapterType = “lsilogic”
ddb.toolsVersion = “7427″