Windows parçalanma yüzdesini nasıl hesaplar?


1

defrag -a -v C:Windows 2008 R2’de çalışırken aşağıdaki çıktıyı aldım:

Windows Disk Birleştiricisi
Telif Hakkı (c) 2006 Microsoft Corp.

C birimi için analiz raporu:

    Birim büyüklüğü = 40.00 GB
    Küme boyutu = 4 KB
    Kullanılan alan = 13.94 GB
    Boş alan = 26.06 GB
    Boş alan yüzdesi =% 65

Dosya parçalanması
    Dosya parçalanma yüzdesi =% 19
    Toplam hareketli dosya = 73,181
    Ortalama dosya boyutu = 233 KB
    Toplam parçalanmış dosya = 1,574
    Toplam fazla parça = 5,611
    Dosya başına ortalama parça = 1.09
    Toplam taşınmaz dosya = 21

Yüzde dosya parçalama değeri bana çok garip geliyor. Dosya sayımlarından 1574 parçalanmış dosya toplam dosya sayısının sadece% 2'si kadardır.

Windows, yüzde dosya parçalanma değerini nasıl hesaplar ?


% 19, her bir sektördeki toplam dosya segmenti miktarına kıyasla, tüm dosyalar arasında parçalanma miktarıdır.
— Ramhound

Windows 64 MB'ın üstündeki dosyaları atlıyor, bu nedenle% 19'un 64 MB'tan küçük dosyalardan hesaplandığını tahmin ediyorum: "Windows XP'de, birden fazla parçaya bölünmüş herhangi bir dosyanın parçalanmış olduğu kabul edilir. Windows Vista'da, parçaların yeterince büyük olması durumunda - birleştirme algoritması (Windows XP'den) 64 MB'tan büyük bir dosyanın parçalarını yoksaymak için değiştirildi. Sonuç olarak, XP'deki birleştirme ve Vista'daki birleştirme, bir birime farklı miktarlarda parçalanma bildirir. " blogs.msdn.com/b/e7/archive/2009/01/25/…
— magicandre1981 5:15

@ magicandre1981 Yalnızca 14 GB alanın kullanıldığını unutmayın. Bu, 64 MB'ın üzerinde 200'den fazla dosya olamayacağı anlamına gelir. Bu yüzden bu farkı açıklamak sanmıyorum, dosyaların zaman toplam sayısıdır 73 181
— JPA

Yanıtlar:


1

Bu hesaplama gizlenir, bilgiler Win32_DefragAnalysis sınıfı tarafından sağlanır :

Win32_DefragAnalysis sınıfı, bir birimde parçalanma değerleri temsil eder. Win32_DefragAnalysis sınıfının bir örneği Win32_Volume yöntemleri DefragAnalysis ve Defrag'dan bir out parametresi olarak iletilir.

class Win32_DefragAnalysis
{
  uint64 AverageFileSize;
  real64 AverageFragmentsPerFile;
  real64 AverageFreeSpacePerExtent;
  uint64 ClusterSize;
  uint64 ExcessFolderFragments;
  uint32 FilePercentFragmentation;
  uint64 FragmentedFolders;
  uint64 FreeSpace;
  uint32 FreeSpacePercent;
  uint32 FreeSpacePercentFragmentation;
  uint64 LargestFreeSpaceExtent;
  uint32 MFTPercentInUse;
  uint64 MFTRecordCount;
  uint64 PageFileSize;
  uint64 TotalExcessFragments;
  uint64 TotalFiles;
  uint64 TotalFolders;
  uint64 TotalFragmentedFiles;
  uint64 TotalFreeSpaceExtents;
  uint64 TotalMFTFragments;
  uint64 TotalPageFileFragments;
  uint32 TotalPercentFragmentation;
  uint64 TotalUnmoveableFiles;
  uint64 UsedSpace;
  string VolumeName;
  uint64 VolumeSize;
};

bu sınıf herhangi bir istemci işletim sisteminin limanı değildir.
— magicandre1981,

Soruyu gerçekten cevaplamıyor. FilePercentFragmentation üyesinin bir yerden belgelenmesini, ancak hiçbir şey bulamamasını beklerdim.
— jpa

1

Öyle görünüyor:

Dosya parçalanma yüzdesi = Boş alan yüzdesi (birleştirmeden sonra) - Boş alan yüzdesi (birleştirmeden önce)

Başka bir deyişle, tam birleştirme gerçekleştirerek boş alan yüzdesi eklendi.

Gördüğünüz gibi,% 7 =% 31 -% 24:

C:\Windows\system32>defrag c: -w -v
Windows Disk Defragmenter
Copyright (c) 2006 Microsoft Corp.`

Defragmentation report for volume C:

    Volume size                         = 74.53 GB
    Cluster size                        = 4 KB
    Used space                          = 55.96 GB
    Free space                          = 18.57 GB
    Percent free space                  = 24 %

File fragmentation
    Percent file fragmentation          = 7 %
    Total movable files                 = 203,178
    Average file size                   = 342 KB
    Total fragmented files              = 3,641
    Total excess fragments              = 32,280
    Average fragments per file          = 1.19
    Total unmovable files               = 26

Free space fragmentation
    Free space                          = 18.57 GB
    Total free space extent             = 22,689
    Average free space per extent       = 858 KB
    Largest free space extent           = 4.09 GB

Folder fragmentation
    Total folders                       = 40,150
    Fragmented folders                  = 155
    Excess folder fragments             = 567

Master File Table (MFT) fragmentation
    Total MFT size                      = 203 MB
    MFT record count                    = 205,234
    Percent MFT in use                  = 98
    Total MFT fragments                 = 3

    Note: On NTFS volumes, file fragments larger than 64MB are not included in the fragmentation statistics

Defragmentation report for volume C:

    Volume size                         = 74.53 GB
    Cluster size                        = 4 KB
    Used space                          = 50.90 GB
    Free space                          = 23.62 GB
    Percent free space                  = 31 %

File fragmentation
    Percent file fragmentation          = 0 %
    Total movable files                 = 203,178
    Average file size                   = 342 KB
    Total fragmented files              = 3
    Total excess fragments              = 1,152
    Average fragments per file          = 1.00
    Total unmovable files               = 26

Free space fragmentation
    Free space                          = 23.62 GB
    Total free space extent             = 10,109
    Average free space per extent       = 2 MB
    Largest free space extent           = 6.99 GB

Folder fragmentation
    Total folders                       = 40,150
    Fragmented folders                  = 1
    Excess folder fragments             = 0

Master File Table (MFT) fragmentation
    Total MFT size                      = 203 MB
    MFT record count                    = 205,234
    Percent MFT in use                  = 98
    Total MFT fragments                 = 3

    Note: On NTFS volumes, file fragments larger than 64MB are not included in the fragmentation statistics

C:\Windows\system32>  

Öte yandan, bir sürücüyü birleştirdikten sonra, Boş alanın yüzdesi değişmez, ne de Toplam parçalanmış dosya sayısı değişse bile yüzde dosya parçalanması değişmez:

C:\Windows\system32>defrag d: -w -v -f
Windows Disk Defragmenter
Copyright (c) 2006 Microsoft Corp.

Defragmentation report for volume D:

    Volume size                         = 932 GB
    Cluster size                        = 4 KB
    Used space                          = 841 GB
    Free space                          = 90.89 GB
    Percent free space                  = 9 %

File fragmentation
    Percent file fragmentation          = 2 %
    Total movable files                 = 400,108
    Average file size                   = 2 MB
    Total fragmented files              = 7,671
    Total excess fragments              = 1,420,753
    Average fragments per file          = 4.70
    Total unmovable files               = 7

Free space fragmentation
    Free space                          = 90.89 GB
    Total free space extent             = 213,633
    Average free space per extent       = 446 KB
    Largest free space extent           = 27.46 GB

Folder fragmentation
    Total folders                       = 16,189
    Fragmented folders                  = 526
    Excess folder fragments             = 2,304

Master File Table (MFT) fragmentation
    Total MFT size                      = 421 MB
    MFT record count                    = 405,678
    Percent MFT in use                  = 94
    Total MFT fragments                 = 3

    Note: On NTFS volumes, file fragments larger than 64MB are not included in the fragmentation statistics

Defragmentation report for volume D:

    Volume size                         = 932 GB
    Cluster size                        = 4 KB
    Used space                          = 841 GB
    Free space                          = 90.89 GB
    Percent free space                  = 9 %

File fragmentation
    Percent file fragmentation          = 2 %
    Total movable files                 = 400,108
    Average file size                   = 2 MB
    Total fragmented files              = 353
    Total excess fragments              = 1,226,342
    Average fragments per file          = 4.19
    Total unmovable files               = 7

Free space fragmentation
    Free space                          = 90.89 GB
    Total free space extent             = 260,094
    Average free space per extent       = 366 KB
    Largest free space extent           = 27.46 GB

Folder fragmentation
    Total folders                       = 16,189
    Fragmented folders                  = 1
    Excess folder fragments             = 0

Master File Table (MFT) fragmentation
    Total MFT size                      = 421 MB
    MFT record count                    = 405,678
    Percent MFT in use                  = 94
    Total MFT fragments                 = 3

    Note: On NTFS volumes, file fragments larger than 64MB are not included in the fragmentation statistics

C:\Windows\system32>
Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.