Microsoft KB Archive/320686

= Disk Quota Charges Increase If You Turn On the NTFS Compression Functionality =

Article ID: 320686

Article Last Modified on 2/28/2007

-

APPLIES TO


 * Microsoft Windows 2000 Service Pack 1
 * Microsoft Windows 2000 Service Pack 2
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Service Pack 1
 * Microsoft Windows 2000 Service Pack 2
 * Microsoft Windows 2000 Service Pack 2

-



This article was previously published under Q320686



SYMPTOMS
If you turn on the NTFS file system compression functionality or if you compress the files that you own on an NTFS volume on which you have turned on the Disk Quotas functionality, the disk quota that you are charged increases. In this situation, you may go over your disk quota limit even if you had plenty of free disk space available before you compressed the files.



CAUSE
The following sizes are associated with a file:
 * Allocated Space: This size is the space that is reserved for a file at an even cluster boundary. NTFS allocates space for a file in increments of clusters based on the cluster size of the volume at the time that it was formatted.
 * File Size: This size is equal to or smaller than the Allocated Space value, and it represents the actual file data &quot;number of bytes&quot; from the beginning of the file to the end of the file.
 * Compressed Allocation: If a file is compressed, it typically consumes less disk space than indicated by the Allocated Space value. The Compressed Allocation value tracks the actual clusters that are in use by the compressed file.

If you right-click a file and click properties, two of the three sizes appear:
 * Size: This value represents the file size and is the actual size of file's data.
 * Size on Disk: This value represents the Allocated Space value. However, if you turn on the compression functionality, this value represents the Compressed Allocation value.

Disk quotas are always calculated by the Allocated Space value of a file because this value is the maximum space that is required if a file is not compressed. NTFS uses compression units to compress files. A compression unit always made up of 16 clusters. If you compress a file that is smaller than 16 clusters or if the file does not fit exactly into a compression unit, NTFS increases the Allocation Space value for a file so that the file fits into the compression units.

For example, if you format the NTFS volume by using 4096 (4-kilobyte [KB]) clusters, if the File Size value for a file that is saved on the volume is 158,208 bytes and the Allocated Space value for this file is 159,744 bytes, this file use 39 clusters. If you compress this file, NTFS must compress it by using 3 16-cluster compression units. To do so, NTFS allocates nine more clusters for a total of 48 clusters. The new Allocated Space value for the file is now 196,608 bytes. However, after you compress the file, the file's Compressed Allocation value is only 110,592 bytes, which is a reduction of 12 clusters worth of actual disk space. You are charged with the larger Allocated Space value (196,608 bytes) in your disk quota. If you compress many files, this additional allocation can add up quickly and cause you to go over your disk quota limit.

NOTE: A single compression unit on an NTFS volume that uses 4-KB clusters is 65,536 bytes (4096 x 16). This value is the minimum Allocated Space value that is charged for a compressed file.



RESOLUTION
To resolve this issue, decompress the files so that the sizes of the file are changed to the file's original smaller Allocated Space value. Because disk quotas always charge you based on the file's Allocated Space value, you cannot stay under your quota limit if you compress a file.

Alternatively, if you want to compress files to save real disk space, increase you disk quota setting to compensate for the extra disk quota that is charged as a result of NTFS compression.



STATUS
This behavior is by design.



MORE INFORMATION
For additional information about disk quotas, click the article number below to view the article in the Microsoft Knowledge Base:

300979 HOW TO: Manage Disk Capacity and Usage By Using Windows 2000

Keywords: kbenv kbprb KB320686

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.